Archive
Posts in Storage
Adding swap to Linux hosts
I recently ran out of swap space on one of my production application servers, and needed to add some additional swap on the fly. Since I didn't have a spare slice free on the server, I created a 1GB file on my / file system with dd, and then used the mkswap and swapon utilities to create a swap device out of that file: To verify the new swap device was available, I dumped /proc/swaps: Filename Type Size Used Priority /dev/hda2 partition 522104 160 -1 /swap1.swp file 1048568 0 -2 Sizing swap is easy to do, but when a server changes roles, previous swap estimates no longer come into play. I am planning to kickstart the server with a different disk layout, which will allow me to allocate a block device of the right size to swap. For the interim, this met our needs.
$ read more →Monitoring hardware RAID controllers with Solaris
I manage several V40Zs running Solaris 10, and these servers utilize the built-in hardware RAID controller. Siince the physical spindles are masked off from the operating system, using a tool like smartmontools to check disk health is not an option. Luckily Solaris shops with the raidctl utility, which provides insight into the status of both the controller and the disks that sit behind that controller: Since raidctl will display a disk fault when a drive fails, I run a shell wrapper from cron every fifteen minutes to check the RAID controller status. If the script detects a problem, it will send an email and generate a syslog entry to let folks know a problem exists…
$ read more →Limiting the size of Solaris tmpfs file systems
I had an application go nuts a week or two ago, and it filled up /tmp on one of my Solaris 10 hosts. Since /tmp is an in memory file system, you can only imagine the chaos this caused. :( To ensure that this never happens again, I modified the tmpfs entry in /etc/vfstab to limit tmpfs to 1GB in size: swap - /tmp tmpfs - yes size=1024m That will teach that pesky application. :)
$ read more →VxFS clear blocks mount option
While reading through the VxFS administrators guide last week, I came across a cool mount option that can be used to zero out file system blocks prior to use: "In environments where performance is more important than absolute data integrity, the preceding situation is not of great concern. However, for environments where data integrity is critical, the VxFS file system provides a mount -o blkclear option that guarantees that uninitialized data does not appear in a file." This is pretty cool, and a useful feature for environments that are super concerned about data integrity
$ read more →Preallocating files sequentially on VxFS file systems
One cool feature that is built into VxFS is the ability to preallocate files sequentially on disk. This capability can benefit sequential workloads, and will typically result in higher throughput since disk seek times are minimized (LBA addressing, disk drive defect management and storage array abstractions can sometimes obscure this, so this may not always be 100% accurate). To use the VxFS preallocation features, a file first needs to be created: In this example, I created a 1GB file (2097152 blocks 512-bytes per block gives us 1GB) named oradata01.dbf, and double checked that it was 1GB by running ls with the "-h" option: total 3.1G -rw-r--r-- 1 root root 1.0G Aug 25 09:06 oradata01.dbf After a file of the correct size has been allocated, the setext utility can be used to reserve blocks for that file, and to create an extent that matches the number of blocks allocated to the file: To verify the settings that were assigned to the file, the getext utility can be used: oradata01.dbf: Bsize 1024 Reserve 2097152 Extent Size 2097152 This is an awesome feature, and yet another reason why VxFS is one of the best file systems available today!
$ read more →