Thread (5 messages) 5 messages, 2 authors, 2014-07-10

Re: no automatic resync after device disconnect then reconnect

From: NeilBrown <hidden>
Date: 2014-07-09 22:58:40

On Wed, 9 Jul 2014 16:44:27 -0600 Chris Murphy [off-list ref]
wrote:
This is in a VM, no data at risk.

Two problems:

1. I intentionally removed one of two md raid1 member devices, boot degraded succeeds, clean power off, reconnect the removed md member device, boot succeeds but an automatic resync does not occur for the previously disconnect md members. Maybe this is expected, I'm not sure, but I'd think a better user experience would be autoresync perhaps with a notification?
Do you?  Maybe the device was removed from the array because it is faulty.
Do you *really* want a faulty device automatically added back into your array?

It is quite possible to set up udev rules and configure mdadm policy to do
this.  I just don't think it is a sensible default.
2. For the raid set with a bitmap, this command succeeds
 # mdadm --manage /dev/md126 --re-add /dev/sdb3
Good to know.
However, for the raid set without bitmap (seems the same otherwise, same metadata version), it fails:
 # mdadm --manage /dev/md127 --re-add /dev/sdb2
mdadm: --re-add for /dev/sdb2 to /dev/md127 is not possible
You need a bitmap to --re-add.
Without a bit map, you are just adding an unused device to an array and
"--add" is the command to use.
If you set up the mdadm policy (in mdadm.conf) suitably then
   mdadm -I /dev/sdb2

would find the add and --add it for you (I think).

NeilBrown

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help