NeilBrown: Grow: reject raid-disks reduction in RAID5 etc before 2.6.32
Martin F. Krafft
madduck at alioth.debian.org
Wed Jan 27 02:03:16 UTC 2010
Module: mdadm
Branch: upstream
Commit: 24d40069d7361c53116659a4000b1c6970cba1fb
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=24d40069d7361c53116659a4000b1c6970cba1fb
Author: NeilBrown <neilb at suse.de>
Date: Tue Oct 20 16:36:03 2009 +1100
Grow: reject raid-disks reduction in RAID5 etc before 2.6.32
2.6.31 has some bugs with restarting a RAID5 reduction, so
refuse to try unless at least 2.6.32.
Signed-off-by: NeilBrown <neilb at suse.de>
---
Grow.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Grow.c b/Grow.c
index 4bd77d9..1111526 100644
--- a/Grow.c
+++ b/Grow.c
@@ -523,6 +523,14 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
devname);
return 1;
}
+
+ if (raid_disks && raid_disks < array.raid_disks && array.level > 1 &&
+ get_linux_version() < 2006032 &&
+ !check_env("MDADM_FORCE_FEWER")) {
+ fprintf(stderr, Name ": reducing the number of devices is not safe before Linux 2.6.32\n"
+ " Please use a newer kernel\n");
+ return 1;
+ }
sra = sysfs_read(fd, 0, GET_LEVEL);
frozen = freeze_array(sra);
if (frozen < 0) {
@@ -627,7 +635,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
}
}
if (raid_disks)
- /* The find raid6->raid5 conversion
+ /* The final raid6->raid5 conversion
* will reduce the number of disks,
* so now we need to aim higher
*/
More information about the pkg-mdadm-commits
mailing list