How to increase AWS EBS NVME size

前端 未结 2 1995
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-02 11:32

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         


        
2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 12:19

    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
    

提交回复
热议问题