Can a file be copied to one hard drive in a RAID 1 mirror set (software RAID), and later have the 2 drives sync up

disk-utilityraid

I think I read that we can set up a RAID 1 mirror set (software RAID) using OS X Mountain Lion using Disk Utilities, and later plug in one drive and copy a file to that drive, and later on, plug both drives in, and the two drives will sync up automatically?

But I just set that up (using 2 brand new drives), and then Eject the RAID set, and now unplug both drives, and plug only one back in, and the drive won't show in Finder, until I use Disk Utilities to examine the drives, then the drive will show up in Finder. And then I copied one file to the drive, and plug in the other drive. And then this second drive blinked for 10 seconds, and I thought they sync'ed up.

However, when I Eject both drives and then plug back the second drive alone and invoke Disk Utilities and look at the drives and then go to Finder to see the files, that new file is not there. And if I plug both drives in and restart the machine, and invoke Disk Utilities, the 2nd drive show up as "Failed", and the RAID set show up as "Degraded".

So is there a way to copy files only to 1 drive and let them sync up later? Sometimes, my Macbook Air may have only 1 open USB port, so I can't plug both drives in. (when I don't have any USB hub).

(I later on tried using "Rebuild" in Disk Utilities, but it took a few minutes and was rebuilding the drive and later on reported that the remaining time is 4 hours. The first drive only have 5GB or content, and the 2nd drive only has 3.5GB — only 1 file which is 1.5 GB is missing).

Best Answer

You're thinking of RAID-1 in the wrong way. RAID-1 is not an architecture intended to happily use a single surviving drive within a raid-1 group, and work out mirroring content later. Ultimately it will do that, but that is considered a recovery operation from a failed state, and it will destructively overwrite the mirror drive after replacement. In RAID-1, the two drives are expected to be both online and available all the time, as transactions will be committed to both. A loss of one drive will not stop the system from operating, but that is considered a failure mode, and as you've seen it will operate in a degraded state.

The expected user operation at that point is to replace the failed drive, at which point the RAID software will make a block-for-block copy from the surviving drive onto the new drive, a process sometimes referred to as resilvering. It doesn't look at files within the filesystem. This can be a resource intensive process, and as you note, can take hours. This is expected behavior.

If you want something that will enforce eventual consistency in drive contents, use something like Rsync. There's an app to help set it up. http://arrsync.sourceforge.net