Configuring and monitoring the T5220 hardware RAID controller

The Sun T5220 comes with a built-in RAID controller, which supports all of the standard RAID levels (0 - 6). Configuring one or more devices to participate in a RAID Configuration is dead simple, since you can use the Solaris raidctl utility. The last T5220 I configured had a root file system that was going to reside on the built-in RAID controller, so I had to boot into single user mode to create my volume. To create a RAID1 volume using the devices c1t0d0 and c1t1d0 (you can get the devices via format or raidctl), you can run raidctl with the “-c” (create raid volume) option, and the names of the disks to mirror:

$ raidctl -c c1t0d0 c1t1d0

Creating RAID volume will destroy all data on spare space of member disks, proceed (yes/no)? yes
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Physical disk 0 created.
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Physical disk 1 created.
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Volume 0 created.
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Physical disk (target 1) is |out of sync||online|
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Volume 0 is |enabled||degraded|
/pci@0/pci@0/pci@2/scsi@0 (mpt0):
Volume 0 is |enabled||resyncing||degraded|

I also wanted to be able to use the cache on the RAID controller, which can be enabled using the raidctl “-p” (set property) option:

$ raidctl -p "wp=on" c1t0d0

Once I had a working RAID1 volume, I created a label on the device with fdisk and proceeded to perform a Solaris 10 installation. After the volume synchronized and Solaris was re-installed, I was able to run raidctl with the “-l” option to display the state of the volume:

$ raidctl -l c1t0d0

Volume Size Stripe Status Cache RAID
Sub Size Level
c1t0d0 136.6G N/A OPTIMAL ON RAID1
0.0.0 136.6G GOOD
0.1.0 136.6G GOOD

The raidctl utility is rather handy, and I created a checklsi script that can be run from cron to check the status of your RAID controllers (from some limited testing it appears FMA doesn’t detect disk faults).

This article was posted by Matty on 2010-01-12 21:08:00 -0400 -0400