0 votes
1 view
in AWS by (19.2k points)

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.

1 Answer

0 votes
by (44.6k points)

The resize2fs tool only works with ext2, ext3 and ext4 and it does not go with XFS filesystem.

Xfs_growfs is a similar tool which is compatible with XFS filesystems. So, you will have to install it first.

sudo yum install xfsprogs.x86_64 --assumeyes

After installing, mount your filesystem

sudo mount -t xfs /dev/sdf /vol

Now, using the xfs_growfs tool, you can expand your file system

sudo xfs_growfs /vol

df -h → this command should show the more available space

Welcome to Intellipaat Community. Get your technical queries answered by top developers !