On Thu, Dec 22 2016, Robert LeBlanc wrote: > It looks like it is still there on the latest master. Thanks for checking! > > # ./mdadm --version > mdadm - v3.4-88-gfa219dd - 22nd September 2016 > > # ./mdadm --detail /dev/md_root > /dev/md_root: > Version : 1.0 > Creation Time : Wed Sep 7 15:58:30 2016 > Raid Level : raid1 > Array Size : 5368708928 (5120.00 GiB 5497.56 GB) > Used Dev Size : unknown This implies that mdadm is opening /dev/md_root/md/component_size .... Ah-ha. get_component_size() hasn't been updated to work with named arrays. it will only open "/sys/block/md%d/md/component_size", or "/sys/block/md_d%d/md/component_size", Please try with the following patch. I'll send a proper version to Jes. Thanks, NeilBrown diff --git a/sysfs.c b/sysfs.c index 84c7348526c9..b0657a04b3a3 100644 --- a/sysfs.c +++ b/sysfs.c @@ -400,14 +400,8 @@ unsigned long long get_component_size(int fd) int n; if (fstat(fd, &stb)) return 0; - if (major(stb.st_rdev) != (unsigned)get_mdp_major()) - snprintf(fname, MAX_SYSFS_PATH_LEN, - "/sys/block/md%d/md/component_size", - (int)minor(stb.st_rdev)); - else - snprintf(fname, MAX_SYSFS_PATH_LEN, - "/sys/block/md_d%d/md/component_size", - (int)minor(stb.st_rdev)>>MdpMinorShift); + snprintf(fname, MAX_SYSFS_PATH_LEN, + "/sys/block/%s/md/component_size", stat2devnm(&stb)); fd = open(fname, O_RDONLY); if (fd < 0) return 0;
Attachment:
signature.asc
Description: PGP signature