fd828476e8
- Update mdadm init script so that status will always run and so return codes are standards compliant - Fix assembly of version 1 superblock devices - Make the attempt to create an already running device have a clearer error message - Allow the creation of a degraded raid4 array like we allow for raid5 - Make mdadm actually pay attention to raid4 devices when in monitor mode - Make the mdmonitor script use daemon() correctly - Fix a bug where manage mode would not add disks correctly under certain conditions - Resolves: bz244582, bz242688, bz230207, bz169596, bz171862, bz171938 - Resolves: bz174642, bz224272, bz186524
54 lines
2.0 KiB
Diff
54 lines
2.0 KiB
Diff
--- mdadm-2.6.2/Monitor.c.raid4 2007-07-03 12:10:34.000000000 -0400
|
|
+++ mdadm-2.6.2/Monitor.c 2007-07-03 12:28:30.000000000 -0400
|
|
@@ -244,8 +244,10 @@ int Monitor(mddev_dev_t devlist,
|
|
close(fd);
|
|
continue;
|
|
}
|
|
- if (array.level != 1 && array.level != 5 && array.level != -4 &&
|
|
- array.level != 6 && array.level != 10) {
|
|
+ /* It's much easier to list what array levels can't
|
|
+ * have a device disappear than all of them that can
|
|
+ */
|
|
+ if (array.level == 0 || array.level == -1) {
|
|
if (!st->err)
|
|
alert("DeviceDisappeared", dev, "Wrong-Level",
|
|
mailaddr, mailfrom, alert_cmd, dosyslog);
|
|
@@ -399,9 +401,8 @@ int Monitor(mddev_dev_t devlist,
|
|
struct mdstat_ent *mse;
|
|
for (mse=mdstat; mse; mse=mse->next)
|
|
if (mse->devnum != MAXINT &&
|
|
- (strcmp(mse->level, "raid1")==0 ||
|
|
- strcmp(mse->level, "raid5")==0 ||
|
|
- strcmp(mse->level, "multipath")==0)
|
|
+ (strcmp(mse->level, "raid0")!=0 &&
|
|
+ strcmp(mse->level, "linear")!=0)
|
|
) {
|
|
struct state *st = malloc(sizeof *st);
|
|
mdu_array_info_t array;
|
|
--- mdadm-2.6.2/Create.c.raid4 2007-07-03 11:47:26.000000000 -0400
|
|
+++ mdadm-2.6.2/Create.c 2007-07-03 11:47:26.000000000 -0400
|
|
@@ -313,12 +313,13 @@ int Create(struct supertype *st, char *m
|
|
}
|
|
}
|
|
|
|
- /* If this is raid5, we want to configure the last active slot
|
|
+ /* If this is raid4/5, we want to configure the last active slot
|
|
* as missing, so that a reconstruct happens (faster than re-parity)
|
|
* FIX: Can we do this for raid6 as well?
|
|
*/
|
|
if (assume_clean==0 && force == 0 && first_missing >= raiddisks) {
|
|
switch ( level ) {
|
|
+ case 4:
|
|
case 5:
|
|
insert_point = raiddisks-1;
|
|
sparedisks++;
|
|
@@ -343,7 +344,7 @@ int Create(struct supertype *st, char *m
|
|
array.md_minor = minor(stb.st_rdev);
|
|
array.not_persistent = 0;
|
|
/*** FIX: Need to do something about RAID-6 here ***/
|
|
- if ( ( (level == 5) &&
|
|
+ if ( ( (level == 4 || level == 5) &&
|
|
(insert_point < raiddisks || first_missing < raiddisks) )
|
|
||
|
|
( level == 6 && missing_disks == 2)
|