mdadm: --update=resync not understood for 1.x metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After upgrading mdadm from released version mdadm-4.2 to the current git version the command
mdadm --assemble --update=resync
started failing with the error "mdadm: --update=resync not understood for 1.x metadata".
My array superblock version is 1.0.

I think this is a regression introduced by https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=7e8daba8b7937716dce8ea28298a4e2e72cb829e
This commit deleted the "else if (strcmp(update, "resync") == 0)" code block without replacing it with a switch case.

The following patch fixed the error for me.

diff --git a/super1.c b/super1.c
index dfde4629..6f23b9eb 100644
--- a/super1.c
+++ b/super1.c
@@ -1356,6 +1356,10 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
 			__cpu_to_le16(info->disk.raid_disk);
 		break;
 	}
+	case UOPT_RESYNC:
+		/* make sure resync happens */
+		sb->resync_offset = 0;
+		break;
 	case UOPT_UUID:
 		copy_uuid(sb->set_uuid, info->uuid, super1.swapuuid);
 

Regards,
Andrea Janna




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux