I have a 200GB EBS volume and am trying to increase the space available. I followed the instructions on: http://www.hellersoftware.com/2012/resize-ebs-volume-attached-to-amazon-web-services-ec2-instance/ and managed to create a snapshot and create a new EBS based on that snapshot.
Everything is peachy, except when I do:
# resize2fs /dev/sdf
I get
resize2fs 1.40.8 (13-Mar-2008) resize2fs: Bad magic number in super-block while trying to open /dev/sdf Couldn't find valid filesystem superblock.
Not sure what's going on there, but my new volume still only shows 200GB, when in fact it's an 800GB volume.
An EBS volume of size 1 TiB can typically take up to 6 hours to be modified. However, the same volume might take 24 hours or longer in other situations. The time it takes for volumes to be modified doesn't always scale linearly.
The answer is NO. It is impossible to decrease EBS volume size. When you have 100GB EBS and you decide to modify it into 30GB you will get error : The size of a volume can only be increased, not decreased .
The OP stated that he was using the XFS filesystem. The tool resize2fs
works with ext2, ext3 and ext4 only.
There's a similar tool available for the XFS filesytem called xfs_growfs. You'll most likely have to install it first
sudo yum install xfsprogs.x86_64 --assumeyes
then mount your filesystem
sudo mount -t xfs /dev/sdf /vol
now you can extend the filesystem
sudo xfs_growfs /vol
df -h
should now show more available space
I hope this helped :)
Tip: ext4 filesystem is the recommended filesystem for EBS volumes ( for the future )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With