xfs_growfs - expand an XFS filesystem
xfs_growfs [-n] [-d] [-D size] MOUNTPOINT
Options you will use
-d- grow the data section to the size of the device (the default)
-D size- grow the data section to this many file system blocks
-n- only print the geometry, change nothing
-d- grow the data section to the size of the device (the usual case)
-D SIZE- grow the data section to SIZE filesystem blocks
-n- print the geometry, change nothing
Examples
$ sudo xfs_growfs /grow the root XFS file system to fill its partition
$ xfs_growfs -n /show the geometry only
Gotchas
- From xfsprogs. Takes the MOUNT POINT (xfs_growfs /), not the device, and works only while mounted. XFS grows online but never shrinks.
- Amazon Linux and RHEL root volumes are XFS; Ubuntu's are ext4 (resize2fs /dev/nvme0n1p1). growpart the partition first.
Try xfs_growfs in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.