>> Since some of those parititions might be (as they are in our case) >> components of a software RAID and since the act of mounting them >> causes uncoordinated modfications to the mirrors behind MD's back, >> we're less than pleased with this "helpful" behavior. > [...] >Any idea how to recover those software RAID'ed drives?
The goal is to cause the mirrors to once again contain identical data. Assume for example that you have two mirrors (/dev/sda5 and /dev/sdb5) of RAID /dev/md0 and that both got accidentally "direct mounted" in the manner under discussion. It's safe to assume that at least minor modifications were made to each, if only because the metadata would be changed to reflect the mount operation and stuff like directory searches. But since we're unhappy even if there's been "just a little" corruption we still want to bring the two mirrors back into sync. I'd recommend picking one mirror as the "master" for this purpose and your goal is to cause MD to conclude that the entire other mirror is out of date WRT the master. If you made important changes on one mirror and wish to retain those changes then designate that one as the master, otherwise just pick one. If I picked sda5 as the master I'd proceed something like this: # Make sure we're not scribbling on live filesystems: umount /dev/sda5 ; umount /dev/sdb5 # We assume MD isn't running, but just in case... umount /dev/md0 ; mdadm --stop /dev/md0 # Make sure MD ignores /dev/sdb5 when started: mdadm --misc --zero-superblock /dev/sdb5 # Start the RAID in degraded mode (only 1 mirror): mdadm --assemble --run /dev/md0 /dev/sda5 # Add the missing mirror: mdadm --add /dev/md0 /dev/sdb5 # Verify that sdb5 is added and resync is underway: cat /proc/mdstat mdadm --query --detail /dev/md0 At this point it'd actually be safe to reboot with the resync underway as it'd be restarted when the system came back up. _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/