How To Fix Error “Wrong Fs Type, Bad Option, Bad Superblock” When Mounting a Filesystem

Author: , June 23rd, 2023

When trying to mount can XFS filestsen on an AWS instance, I got the error “mount: wrong fs type, bad option, bad superblock on /dev/sdh” Examine the volume’s UUID with the xfs_db command: shell> sudo xfs_db -c uuid /dev/nvme2n1 To fix the problem, you have two options… Temporary Solution Add nouuid mount option to temporarily […]

How To Expand an EBS Volume After a Disk Resize on Amazon Linux

Author: , April 17th, 2023

First, use the AWS Console to modify the volume to the desired size, in our example we want to go from 10GB to 25GB for the root filesystem For a Xen ext4 root volume

For NVMe First, use lsblk to see the raw partitions:

Note how the partition at 259:1 is only 20GB, […]

How To Expand an NVMe EBS Volumes After a Disk Resize on Amazon Linux

Author: , February 19th, 2021

First, use lsblk to see the raw partitions:

Note how the partition at 259:1 is only 20GB, while the entire disk at 259:0 is 40GB. A partition resize is required in this case.

For an EXT4 filesystem, use the resize2fs command instead:

For more information, please visit the AMW Docs: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

How To Create An XFS Formatted Filesystem On AWS EC2

Author: , October 26th, 2011

First, use the AWS management console to create and attach a new volume. Note the device name, in our example /dev/sdf.

You now have a 10 GB (or whatever size you specified) EBS volume mounted under /data with an XFS file system, and it will be automatically mounted if the instance reboots.