Thread (7 messages) 7 messages, 3 authors, 2015-06-25

Re: (R) in mdstat output, clean && degraded

From: Jared Mauch <hidden>
Date: 2015-06-25 11:47:25

On Jun 24, 2015, at 6:52 PM, NeilBrown [off-list ref] wrote:

You should be able to turn this into a fully functional RAID1 array by:

mdadm /dev/md127 --fail /dev/sdd1 
mdadm /dev/md127 --remove /dev/sdd1
mdadm /dev/md127 --re-add /dev/sdd1

When you fail sdd1, sdg1 will change from being a 'replacement' to being
a regular member.
When you --re-add /dev/sdd1 you benefit from the fact that raid1
doesn't really care which device is in which slot (unlike raid5).
So re-adding something marked for slot 0 into slot 1 is perfectly
acceptable.
As the bitmap is present and uptodate, the recovery will be very fast.

I would recommend doing some basic checks for data consistency after
removing sdd1 and before re-adding it.  I might be wrong about
something and sdg1 might contain complete garbage - it never hurts to
check :-)
So this actually doesn’t work:

# mdadm /dev/md127 --fail /dev/sdd1
mdadm: set device faulty failed for /dev/sdd1:  Device or resource busy
# mdadm /dev/md127 --fail /dev/sdg1
mdadm: set device faulty failed for /dev/sdg1:  Device or resource busy

so I may have to physically remove sdd1 to recover this it seems, or stop
and reassemble is my guess.

- Jared

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help