[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Tue, 20 Oct 2009, Grant Sewell wrote:
Hi all, Just a quick "what if" question... 2 USB drives where periodically rsync is run to duplicate drive 1 onto drive 2. Drive 1 is static, drive 2 (should) get removed every evening and taken off-site. If the two drives were setup in a software-based RAID-1 (mirror) configuration, would they automatically reconcile any differences when drive 2 was re-attached? If not, how can differences between two software RAID-0 drives be reconciled? Is there a command that initiate the reconciliation? Can this be added to a udev rule so that when drive 2 is re-attached the reconciliation happens automatically?
It won't happen automatically.And also I don't use udev myself, so don't know how it all ties into this, however I have built many (100's) of servers with Linux s/w RAID, so ...
You can just unplug a drive. The system will get upset, print lots of warnings, etc. but it should be fine. That's what it was intended for, afterall.
You can keep it happier if you issue the right commands though: mdadm /dev/md0 --fail /dev/sdb mdadm /dev/md0 --remove /dev/sdb then unplug it. To get it back in, plug it in, then mdadm /dev/md0 --add /dev/sdbbut that's without udev. I have absoltuely no idea what udev, hotplug, etc. does with s/w RAID devices.
Personally I'd stick with the rsync method. Gordon -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html