[CentOS] adding a usb drive to an existing raid1 set

Fri Sep 29 18:48:23 UTC 2006
Les Mikesell <lesmikesell at gmail.com>

On Fri, 2006-09-29 at 13:23 -0500, rado wrote:
> so close yet so far or maybe that's just the way it is, I am dumb on it
> but gettin smarter.
> 
> the 2 ide drives diff channels of course hda and hdc each w/3 partitions
> hda1 2 3  hdc1 2 3.
> 
> I format hot add sda1 2 3 
> cat /proc/mdstat it's all there

Unless you created it with 3 members, the 3rd is added as a spare.

> ...# mdadm /dev/md0 1 2 -f /dev/hdc1 2 3 (fail or fault hdc
> 
> md automatically picks up sda from spare status and writes to it.
> 
> it finishes mind you hdc is still under fail status and I reboot.
> 
> when the sys comes back up, it does not pick up sda anymore but instead
> just runs -U on all 3 partitions 

You can add /dev/hdc1 back if it didn't resync automatically.

> I was under the impression that sda would be there either I missed a
> step somewhere or something strange going on

I don't think usb/firewire is detected early enough to be included
in the raid assembly at bootup.  That's why I set mine up to use
2 internal drives all the time but only periodically sync to the
external drives that are then rotated offsite.  And if you want to
be sure everything is clean on the copy, you should stop any
processes running on the mounted partition, and unmount the mount
point momentarily while you fail the disk.  If you don't, the
contents would be the same as if the machine had crashed - probably
still usable, but it could have problems.

-- 
  Les Mikesell
   lesmikesell at gmail.com