Bug#767243: mdadm: a new disk always remains spare instead of becoming active
Matija Nalis
mnalis-debianbug at tomsoft.hr
Wed Oct 29 23:30:56 UTC 2014
Summary: Thanks for your quick feedback! You can close this as invalid.
I do understand BTS is not general support forum, and I was genuinely
believing that there was bug in mdadm, as I though both source and
destination disks were without errors (despite SMART errors I've got
on /dev/sde, it looked undamaged and it's removal was supposed to be
preemptive). That belief was reinforced by seeing /proc/mdstat
showing sync progress going above 99.9% without aborting.
The steps I've tried that look like usage errors (-G -n2, ...) were
my last-resort (perhaps misguided) attempts to force mdadm to realize
there are supposed to be two ACTIVE disks in the array (aand not
active+spare) - and I've only tried them the because regular way
(mdadm --add, --remove) didn't work when I though it really should.
That being said, you were correct afterall :-)
Your response prompted me to doublecheck, and I've run badblocks(8)
on both destination disks (both ok) and source /dev/sde2 disk.
And the source disk was really having bad sectors - about 80 of them,
at 99.97%. That last 0.03% was visually too quick to notice, so I was
fooled by /proc/mdstat showing how it progresses from 0% to 99.9%+
without error and I wrongly assumed it did manage to finish the sync
(but somehow didn't update the active/spares, due to some bug)
Some hammering with hdparm --write-sector managed to zero-out that
few sectors (which didn't appear to be used by any files), and after
that mdadm did finish the sync.
Anyway, may the bug be archived for future adventurers with same
problem.
--
Opinions above are GNU-copylefted.
More information about the pkg-mdadm-devel
mailing list