You are here

RAID on Snow Leopard

Apple Snow LeopardI had avoided upgrading to Snow Leopard for several months, and finally completed the upgrade a few weeks ago. It went mostly without trouble, though there were a few minor things that needed to be fixed.

However, I was greeted with "new and improved!" RAID support which, as usual, provides only the most terse of directions. I rely on mirrored RAID to construct off-site backups. When I went to apply my procedure to Snow Leopard, I had to figure out the difference between "Delete" and "Demote" in order to get my backups rebuilt.

[Here's a more recent post to address the disappearance of "Demote"]

 

Snow Leopard's RAID improvements address an old problem with Apple's software RAID: if you swap in an old RAID volume for a new one, the software doesn't detect the swap. It assumes that the replaced volume is exactly the same as the old one. Moreover, if you temporarily remove a RAID volume and run without it for a while, Apple doesn't detect this when you plug it back in.

 

If you think about it, this was a recipe for disaster. The removed drive isn't anywhere close to being up-to-date. If OS-X treats both drives as up-to-date, then it might pull obsolete sectors off of the temporarily-missing drive.

 

In Snow Leopard, the RAID system now seems to identify drives uniquely and track their behavior. If a drive is removed, then the RAID system remembers. When you plug it back in, RAID happily lets you rebuild it, avoiding it until it is rebuilt. This is great if you use external USB drives for RAID, which I don't. And it does promise to fix an ongoing problem with my RAID-as-backup process.

RAID 1 Maintenance Commands

The DiskUtil program in Snow Leopard, OS-X 10.6, provides the old RAID operations, plus some new ones. Software RAID on DiskUtil treats a RAID 1 set as being either "Healthy" or "Degraded," the latter indicating that a drive is not currently usable.

Demote

This is a new command. It lets me remove a disk from a RAID 1 set. If the disk is damaged or no longer available, the Demote command removes that drive from the set, once and forever. If we add it back in, the RAID software rewrites its contents.

 

It leaves the rest of the set untouched, and still "Degraded."

Delete

This 'breaks up' the RAID 1 set. Do not mistake this for Demote.

 

The Delete command turns the RAID 1 drives into separate volumes. I don't know what damage this does to a striped set. On a mirrored set, you are supposed to end up with a pair of more-or-less identical drives. This essentially makes the RAID set disappear as a RAID set, though the data continues to exist on the separate drives.

Rebuild

This is a relatively cranky command in Snow Leopard. DiskUtil won't let you do it until the stars are all perfectly aligned. To rebuild a RAID 1 set after losing a drive, you must first Demote the missing drive. Then you drag in the new drive. Only then will the Rebuild button light up, allowing you to actually perform the rebuild.

Auto-Rebuild

This is another new feature, and it applies to new mirrored RAID sets. If you check the Auto-Rebuild option when you create the set, then DiskUtil will automatically rebuild the RAID set if the drive goes missing for a while and then reappears. This is probably a good choice.

 

Once you Demote a drive, I guess it won't auto-rebuild any more.

A Caveat

I have not really tried Auto-Rebuild. I believe it works, given the behavior I'm seeing in the newest DiskUtil. On the other hand, this is the sort of thing that software developers get wrong all the time, since it resides at the end of some difficult road that few system users travel.

 

I also believe that Apple has finally fixed that old problem where the RAID software would try to use an old RAID volume if it reappeared later. I have not actually tested Snow Leopard to know for sure.

 

In older versions of OS X, I would swap out an up-to-date RAID drive and swap in an old drive I was using as an off-site backup. The RAID software would merrily use the ancient drive as if it were the up-to-date drive. This has apparently been fixed in OS-X.

 

To deal with this mess in the past, I've had to attach the old RAID drive to my laptop and run the MSDOS DiskPart command. The RAID software apparently works at the partition level, and tended to brand identity information on the partitions themselves. Unless I ran DiskPart's CLEAN command to totally obliterate the old partition data, the RAID software would recognize the drive as a member of the RAID set.

 

I am optimistic that this may have been fixed in this release. Let's hope so. Stay tuned.

Post category: 
Wordpress tag: 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer