>>> Dimitri Maziuk <[email protected]> schrieb am 20.09.2011 um 19:19 in Nachricht <[email protected]>: > On 09/20/2011 09:51 AM, Ulrich Windl wrote: > > > h02:~ # mdadm /dev/md6 --fail detached > > h02:~ # mdadm -v /dev/md6 --remove failed > > h02:~ # mdadm /dev/md6 --fail /dev/dm-27 > > mdadm: set /dev/dm-27 faulty in /dev/md6 > > ### It only works if the device is explicitly named! > > h02:~ # mdadm /dev/md6 --remove /dev/dm-27 > > mdadm: hot removed /dev/dm-27 from /dev/md6 > > h02:~ # mdadm /dev/md6 --re-add missing > > mdadm: re-added /dev/disk/by-id/dm-name-T11_AS_2-E1 > > ### Only then "--re-add missing" works. > > I'm probably missing something here, but last I checked --re-add was > supposed to be used only to add the same physical device you've > previously --remove'd. If you're adding a replacement disk, even if it > has the same /dev/xyzN name as the previously removed one, you need to > use --add.
Hi! For a FC-connected SAN disk, it's usual that device names change if the connection to the disk (not the disk) is reestablished after being away for a longer time. That's why multipathd maps them to some persistent name. As it seems, however, the device mapper name changes. Still, the "disk" is the same as before, even when under a different name. I always thought device names mean about nothing to mdraid. So --re-add should be fine, right? The basic question is why a disk that is gone (no paths left in multipath) is visible as "failed spare". Unfortunately that prevents a rebuild with that spare as well as a "--re-add". > > The "missing" keyword is mostly used to create or start arrays in > "degraded" mode. > > If that is still the case, what exactly is "--re-add missing" supposed > to accomplish? If you look at the commands that the RA does to recover a stale leg, you'll see that the faulty disk is removed first, and then "--re-add missing" will examine the present disks to find one that matches the RAID. On a successful re-add the disk will be updated (RAID will be resynchronized). Regards, Ulrich _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
