(original article)

Re: Converting RAID5 to RAID6 and other shape changing in md/raid

26 July 2010, 03:10 UTC

Thank you for the lightning fast response!

Unfortunately, that sequence did not work:

# mdadm --grow /dev/md2 --size=max mdadm: component size of /dev/md2 has been set to 976759808K

IMO, going from 1T to 2T should result in a component size double that value. There are 4x 2T devices in the array now and 2x 1T devices. Isn't max the max common to all devices, and thus 1T?

The 2T devices are partitioned as follows:

# fdisk -l /dev/sdb Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x2051f33f Device Boot Start End Blocks Id System /dev/sdb1 1 243201 1953512001 fd Linux raid autodetect

# mdadm --grow /dev/md2 --raid-devices=4 mdadm: this change will reduce the size of the array. use --grow --array-size first to truncate array. e.g. mdadm --grow /dev/md2 --array-size 2930279424

This is telling me to shrink the array to 3T which I cannot do since the array is nearly full (5T of data).

Is it necessary to fail the 1T devices first? If so, I can only reduce by 1 then. Yes?