From b357ef43f926179b34fa3d9c78b96f1defd7e4b2 Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Mon, 11 Apr 2011 15:00:13 +1000 Subject: [PATCH] FIX: Raid0 expansion cannot be restarted When raid0 expansion is restarted, mdadm refuses to correctly assemble array because critical section cannot be restored from backup file. mdadm exits with information: mdadm: Failed to restore critical section for reshape - sorry. For raid0 new level is 0, current array level is 4. Function Grow_restart() doesn't allow for level change. Grow_restart really shouldn't be checking for level changes. As they are always instantaneous they should never appear in the metadata so it doesn't mean anything to check for them. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- Grow.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/Grow.c b/Grow.c index d6ecde2..d4308bc 100644 --- a/Grow.c +++ b/Grow.c @@ -3102,9 +3102,6 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt unsigned long long nstripe, ostripe; int ndata, odata; - if (info->new_level != info->array.level) - return 1; /* Cannot handle level changes (they are instantaneous) */ - odata = info->array.raid_disks - info->delta_disks - 1; if (info->array.level == 6) odata--; /* number of data disks */ ndata = info->array.raid_disks - 1;