Can't grow XFS file system on Amazon EC2: xfs_growfs: / is not a mounted XFS filesystem

I've followed instructions here exactly: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html for "Example: Extending the file system of NVMe EBS volumes" trying to grow a disk from 10 GB to 20 GB.

When I get to step 6, sudo xfs_growfs -d /, I get xfs_growfs: / is not a mounted XFS filesystem

Tried rebooting instance but that didn't help.

lsblk yields:

NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1      259:0    0   20G  0 disk
├─nvme0n1p1  259:1    0 19.9G  0 part /
├─nvme0n1p14 259:2    0    3M  0 part
└─nvme0n1p15 259:3    0  124M  0 part /boot/efi

df -h outputs:

Filesystem       Size  Used Avail Use% Mounted on
udev             224M     0  224M   0% /dev
tmpfs             47M  2.2M   45M   5% /run
/dev/nvme0n1p1    20G  9.1G  9.6G  49% /
tmpfs            233M     0  233M   0% /dev/shm
tmpfs            5.0M     0  5.0M   0% /run/lock
tmpfs            233M     0  233M   0% /sys/fs/cgroup
/dev/nvme0n1p15  124M  262K  124M   1% /boot/efi
tmpfs             47M     0   47M   0% /run/user/1000

Notice the available space on the /dev/nvme0n1p1 device says 49% but according to the Used/Avail columns it should be more like 99%.


Got this error when using it on a file system that wasn't XFS.

Had to use this instead (for ext4 volumes).

sudo resize2fs /dev/xvda1

As @MichaelHampton commented, it may not be an XFS system.

The AWS guide you mentioned should really indicate either

  1. the difference between XFS (step 7) and ext4 (step 8) more clearly and that those two steps are mutually exclusive
  2. that "a reboot tends to trigger the file system to expand to take up all the space in the EBS volume" as @Tim said