DEV Community

Tai Ha for AWS Community ASEAN

Posted on • Edited on

AWS EBS root volume expansion

**
Modify Volume
**

EC2 > Volumes > Actions > Select Volume > Modify Volume

It can be changed while EC2 Instance is running.

image

image
image
image
image

・Restriction

Once changed, it cannot be changed for 6 hours.

image

Command

    df -h                                                                                               
    lsblk                                                                                               
    sudo growpart /dev/xvda 1                                                                                               
    lsblk                                                                                               
    sudo xfs_growfs /dev/xvda1                      For Linux 1 AMI: resize2fs /dev/xvda1                                                                       
    df -h   
NVME
    sudo growpart /dev/nvme0n1 1
        xfs_growfs /dev/nvme0n1p1                                                                                       
Enter fullscreen mode Exit fullscreen mode

・EC2 Instance (Command)

image

Ref https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html

Top comments (0)