I have upgraded an EC2 instance from m4 to m5, and now I want to increase the volume.
I did perform this command and got the error:
growpart /dev/nvme0n1
resize2fs
didn't work for me, so I used this instead:
xfs_growfs /dev/nvme0n1p1
resize2fs
gave me this error when I used it:
[root@ip-1-2-3-4 ~]# resize2fs /dev/nvme0n1p1
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/nvme0n1p1
Couldn't find valid filesystem superblock.
I noticed the disk was using xfs
under /etc/fstab
:
UUID=4cbf4a19-1fba-4027-bf92-xxxxxxxxxxxx / xfs defaults,noatime 1 1