Trying to resize2fs EB volume fails [closed]

时光毁灭记忆、已成空白 提交于 2019-12-03 05:39:04

问题


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:


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 )



来源:https://stackoverflow.com/questions/13362910/trying-to-resize2fs-eb-volume-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!