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:

$ raidctl

RAID    Volume  RAID            RAID            Disk
Volume  Type    Status          Disk            Status
------------------------------------------------------
c1t0d0  IM      OK              c1t0d0          OK
                                c1t1d0          OK

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. Viva la hardware RAID!

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:

$ grep ^swap /etc/vfstab

swap    -       /tmp    tmpfs   -       yes     size=1024m

That will teach that pesky application. :)