Today I decided that was time to fix one of the Xserve that I administer and was reporting a problem with the RAID for a long time. The server is far from being critical, that is why I did not bother before.
As a side not remember that the Xserve 3 drive bays, but you could easily export this example for whatever other Mac computer you have.
So when I opened the RAID Utility it was reporting that both volumes where degraded, the RAID set was set to raid5 was also degraded and there where only two hard drives showing, both in green status.
Reading the message clearly stated that the RAID set was degraded because there was no spare drive, no wonder when you think that this is supposed to be a raid5 with two drives!
Ok, so first diagnose clearly showed that drive in bay 1 was dead. Replaced the drive but no luck. Restarted the server and there it was, the new drive showing in green status but not assigned to any RAID set therefore was roaming.
I checked all the options around the RAID util but no option to add one roaming drive to an existing raid set. A colleague mentioned that back in the old days he used to use the command line to do this “advanced tasks”. Checked the available command line software and found the excellent raidutil. A quick read through the man page (download here) and jumped to try things.
First list the devices available
Only one RAID controller (how useful :S )
Then listed the drives
1 2 3 4 5 6
1 2 3 4 5
The new drive is the bigger one. This confirms what we see in the gui
Then tried to join the new drive to the raidset
1 2 3 4
But no luck, error. What if we adopt first the drive?
And then add it to the raidset
That should get the rebuild started. Let’s confirm
1 2 3 4 5
I got excited to learn this new tool and see how easy and powerful it is to use. This can be used to remotely administer and check raid configurations and to script some setups