Increase xfs root partition on AWS instance without LVM

On an EC2 instance with an EBS volume of 200GB I right-clicked the volume and chose to ‘Modify Volume’, then set a new size for the disk.

On the OS (RHEL 7.6) you can check that the new size of the disk is visible with:

fdisk -l
lsblk

Then increase the partition with:

growpart /dev/nvme0n1 2

And confirm the change:

lsblk
df -h

Then grow the XFS filesystem:

xfs_growfs /

And confirm the change:

df -h

2 Responses to “Increase xfs root partition on AWS instance without LVM”

  1. Nishith N. Vyas

    Hello,

    I’ve launched AWS EC2 Instance based on m6g.2xlarge with 50 GB EBS Partition. After boot up, I don’t see the whole 50 GB Partition to use. It is showing 50 GB Allocated, but the “/” partition size is just 8 GB In size.

    So, My question is where the hell reset of the free space go?

    See below the command output for more information.

    # lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    nvme0n1 259:0 0 50G 0 disk
    ├─nvme0n1p1 259:1 0 200M 0 part /boot/efi
    └─nvme0n1p2 259:2 0 7.8G 0 part /

    # df -kh
    Filesystem Size Used Avail Use% Mounted on
    devtmpfs 7.6G 0 7.6G 0% /dev
    tmpfs 7.6G 0 7.6G 0% /dev/shm
    tmpfs 7.6G 23M 7.6G 1% /run
    tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
    /dev/nvme0n1p2 7.8G 861M 7.0G 11% /
    /dev/nvme0n1p1 200M 8.9M 191M 5% /boot/efi
    tmpfs 1.6G 0 1.6G 0% /run/user/1000
    tmpfs 1.6G 0 1.6G 0% /run/user/0

    Please guide if possible.

    Reply

Leave a Reply to Jose

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>