You are here

RAID Backups Redux: Snow Leopard

Grumble, grumble.

There has been an update to the DiskUtil program that prevents my RAID backup procedure from working.

The version I am running - Version 11.5.2 (298.4) - no longer provides a "Remove" or "Demote" function when a RAID drive is missing or offline. I've found two ways around this. I recommend the first approach for regular use. The second is only provided to illustrate a bizarre feature of Apple RAID.

Workaround #1: Command Line DiskUtil

DiskUtil still has the capability of removing a drive from a RAID set, it's just that the command no longer appears in the GUI. So you can use "command line DiskUtil." It works just fine, and you don't have to run it as root. Just start up the Terminal to get the command shell and type these commands:

diskutil appleraid list

This will print out a fancy report describing your RAID set (or sets if you have more than one). Here's the part to pay attention to:

-------------------------------------------------------------------------------
#   Device Node             UUID             Status
-------------------------------------------------------------------------------
0   -none-            B6FDEED3-64D9-481A-ACE6-89127ACB22FC   Missing/Damaged
1   disk1s2           4D6AE0C9-CD55-484B-83B0-CE5E20078827   Online
=============================================

Note that one of the devices has no device node ("-none-") and/or its status is "Missing/Damaged." You need to "select and copy" the entire UUID (the long, ugly hexadecimal number in the third column) for the missing device.

Then, you type the following command with the UUID pasted in, assuming "MyRaid" is the name of your RAID set:

diskutil appleraid remove  B6FDEED3-64D9-481A-ACE6-89127ACB22FC MyRaid

This will remove the missing device from the RAID set. Now you can run the GUI-based DiskUtil application, add in a replacement volume, and rebuild it.

Workaround #2: Drive Swapping

This works, but I do not recommend it, since you have to juggle hard drives, which is always an opportunity to make a really painful mistake. On the other hand, the whole process uses the GUI-based DiskUtil application. Here's the process in its ugly glory:

  1. Turn off your Mac Pro if this involves swapping drives in drive bays.
  2. Remove Drive A from the mirrored RAID set (it contains Drive A and Drive B), and insert the Blank Drive.
  3. Restart your machine. Run DiskUtil and delete your RAID set. Turn off your machine again, if it's a Mac Pro.
  4. Swap Drive B and Drive A. You should now have Drive B as your backup. You should have Drive A as the online part of your RAID set. Restart your machine.
  5. Run DiskUtil and add the Blank Drive to your now-incomplete RAID set.

Personally, I think this is a really creepy way to do it. But I've seen it work. This gives you a disaster-recovery offsite backup of whatever is on the disk you removed. On the other hand, if you really need to use the offsite backup drive, it doesn't let you rebuild your lost RAID system. This is because the backup drive is no longer a RAID drive - after all, you deleted its RAID set.

So, what bizarre feature does this illustrate about Apple's software RAID? It shows that RAID-ness is a property of the hard drives. Changes in the RAID configuration aren't saved on the system drive, they're saved on the drives in the set.

This probably explains why the RAID GUI no longer lets us "Demote" a drive. You can't really demote an offline drive since there's no way to actually update the drive to really remove it from the RAID set. On the other hand, this leaves us with no way to rebuild a RAID set if one drive simply dies.

Well, really, you can still do it, but you have to use the command line diskutil.

Post category: 
Wordpress tag: 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer