FIX: Array after takeover has to be frozen
Problem occurs when we want to expand single disk raid0 array. This is done via degraded 2 disks raid4 array. When new spare is added to array, md immediately initiates recovery before mdadm can configure and start reshape. This is due fact that 2 disk raid4/5 array is special md case. Mdmon does nothing here because container is blocked. Put array in to frozen state allows mdadm to finish configuration before reshape is executed in md. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
d7d205bd25
commit
a9c3e78fdd
6
Grow.c
6
Grow.c
|
@ -1632,6 +1632,12 @@ static int reshape_array(char *container, int fd, char *devname,
|
|||
return 0;
|
||||
goto started;
|
||||
}
|
||||
/* The container is frozen but the array may not be.
|
||||
* So freeze the array so spares don't get put to the wrong use
|
||||
* FIXME there should probably be a cleaner separation between
|
||||
* freeze_array and freeze_container.
|
||||
*/
|
||||
sysfs_freeze_array(info);
|
||||
spares_needed = max(reshape.before.data_disks,
|
||||
reshape.after.data_disks)
|
||||
+ reshape.parity - array.raid_disks;
|
||||
|
|
Loading…
Reference in New Issue