Hi! I examined the problem somewhat closer: In SLES11 SP1 the RAID gets a "faulty spare" even without the RA's recovery attempt. Unfortunately the following commands do not work:
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. What the kernel said during failure is this: Sep 20 16:07:03 h02 kernel: [1318641.475211] raid1: Disk failure on dm-23, disabling device. Sep 20 16:07:03 h02 kernel: [1318641.475213] raid1: Operation continuing on 1 devices. Sep 20 16:07:03 h02 kernel: [1318641.475221] raid1: dm-20: redirecting sector 8 to another mirror Sep 20 16:07:03 h02 kernel: [1318641.487293] RAID1 conf printout: Sep 20 16:07:03 h02 kernel: [1318641.487296] --- wd:1 rd:2 Sep 20 16:07:03 h02 kernel: [1318641.487299] disk 0, wo:1, o:0, dev:dm-23 Sep 20 16:07:03 h02 kernel: [1318641.487301] disk 1, wo:0, o:1, dev:dm-20 Regards, Ulrich >>> Ich schrieb am 20.09.2011 um 10:49 in Nachricht <4E78538B.D5B : 161 : 60728>: > Hi! > > We made a test that disconnected a disk of a RAID1. During that time the > Raid1 monitor tried a recovery. Unfortunately that recovery caused the disk > to be marked as "faulty spare", which in turn prevented later recoveries when > the disk was actually back: > > -a $TRY_READD -eq 1 -a $OCF_CHECK_LEVEL -gt 0 ]; then > ocf_log info "Attempting recovery sequence to re-add devices > on\ > $MDDEV:" > $MDADM $MDDEV --fail detached > $MDADM $MDDEV --remove failed > $MDADM $MDDEV --re-add missing > # TODO: At this stage, there's nothing to actually do > # here. Either this worked or it did not. > > > RAID details in bad state: > [...] > Number Major Minor RaidDevice State > 0 0 0 0 removed > 1 253 13 1 active sync /dev/dm-13 > > 0 253 27 - faulty spare /dev/dm-27 > > RAID details after fixing it: > [...] > Number Major Minor RaidDevice State > 0 253 27 0 active sync /dev/dm-27 > 1 253 13 1 active sync /dev/dm-13 > > I wonder whether just a "--re-add missing" is enough for a recovery. > > Regards, > Ulrich > > _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
