growing EBS RAID volume

Posted by Ryan Fernandes on Server Fault See other posts from Server Fault or by Ryan Fernandes
Published on 2011-02-25T04:54:52Z Indexed on 2012/12/13 23:06 UTC
Read the original article Hit count: 236

Filed under:
|
|
|

I've created a RAID0 configuration with two 1GB EBS volumes, mounted at /dev/md0 using mdadm and formatted with XFS Next, I copied some files over to fill the volume to around 30% of its capacity (of 2GB)

I then created snapshots of the volumes using ec2-consistent-snapshot and created volumes of the said snapshots but specified the volume size to be 2GB (effective doubling the capacity on each disk)

I then spun up a new instance, assembled the RAID0 configuration on /dev/md0 from the 2 volumes mentioned above and mount it to /vol

df -hT showed /vol as 2GB (as expected)

Now I ran sudo xfs_growfs -d /vol. The command completed normally but reported blocks changed from 523776 to 524160 (only!) and df -hT still showed /vol as 2GB (instead of the expected 4GB)

I rebooted, remounted, reassembled the RAID but it still reports the old size.

EDIT: trying to grow the RAID using mdadm --grow yields mdadm: raid0 array /dev/md0 cannot be reshaped

Is there any other way I can grow a RAID0 array?

© Server Fault or respective owner

Related posts about raid

Related posts about amazon-ec2