Re: Shrinking number of devices on a RAID-10 (near 2) array

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

 



On Mon, 25 Aug 2014 10:32:34 +0000 Andy Smith <andy@xxxxxxxxxxxxxx> wrote:

> On Sun, Aug 24, 2014 at 02:39:44PM +0000, Andy Smith wrote:
> > $ sudo ./mdadm /dev/md2 --grow --raid-devices=4
> > mdadm: Cannot set new_data_offset: RAID10 reshape not
> >        supported on this kernel
> 
> Grow.c from latest git:
> 
> 2397                         err = sysfs_set_num(sra, sd, "new_offset",
> 2398                                             new_data_offset);
> 
> For the first device in the for loop (sda3), the above line 2397 is
> returning -1.
> 
> 2399                 }
> 2400                 if (err < 0) {
> 2401                         if (errno == E2BIG && data_offset != INVALID_SECTORS) {
> 2402                                 pr_err("data-offset is too big for %s\n",
> 2403                                        dn);
> 2404                                 goto release;
> 2405                         }
> 2406                         if (sd == sra->devs &&
> 2407                             (errno == ENOENT || errno == E2BIG))
> 2408                                 /* Early kernel, no 'new_offset' file,
> 2409                                  * or kernel doesn't like us.
> 2410                                  * For RAID5/6 this is not fatal
> 2411                                  */
> 2412                                 return 1;
> 
> It reaches here line 2412 with errno == E2BIG.
> /sys/block/md2/md/dev-sda3/new_offset exists.
> 
> >From strace:
> 
> open("/sys/block/md2/md/dev-sda3/new_offset", O_WRONLY) = 4
> write(4, "128", 3)                      = -1 E2BIG (Argument list too long)
> close(4)                                = 0
> 
> Not sure where to debug next.

That comes from
	else if (new_offset > rdev->data_offset) {
		/* must not push array size beyond rdev_sectors */
		if (new_offset - rdev->data_offset
		    + mddev->dev_sectors > rdev->sectors)
				return -E2BIG;

in drivers/md/md.c in the kernel...

What does "mdadm --examine" on one of the devices report now that it is v1.0?

Particularly interested in the "Unused Space :" line.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[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