xfs_growfs(8)

πŸ“¦
version 7.2.1 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

xfs_growfs β€” expand an XFS filesystem ✨ (yes bestie, we're making your filesystem BIGGER)


🌸 SYNOPSIS 🌸

xfs_growfs [ -dilnrx ] [ -D size ] [ -e rtextsize ] [ -L size ] [ -m maxpct ] [ -t mtab ] [ -R size ] [ mount-point | block-device ]

xfs_growfs -V

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so xfs_growfs expands an existing XFS filesystem (peep xfs(5) for the lore πŸ‘€).

The mount-point argument is the pathname of the directory where the filesystem is mounted. The block-device argument is the device name of a mounted XFS filesystem.

Heads up: the filesystem must be mounted for it to be grown (go read mount(8), iykyk).

The existing contents of the filesystem are left completely undisturbed β€” no cap β€” and the added space becomes available for additional file storage. It's giving glow-up, not makeover πŸ’…


✨ OPTIONS ✨

  • -d | -D size β€” says the data section of the filesystem should be resized. If you pass -D size, the data section gets changed to that size; otherwise with just -d the data section grows to the largest size possible. The size is expressed in filesystem blocks. A filesystem with only 1 AG cannot be shrunk further, and a filesystem cannot be shrunk to the point where it would only have 1 AG. [NOTE: Only shrinking the last AG without removing it is implemented]
  • -e β€” lets you specify the real-time extent size. In mkfs.xfs(8) this is specified with -r extsize=nnnn.
  • -i β€” the new log is an internal log (inside the data section). [NOTE: This option is not implemented] 🫠
  • -l | -L size β€” says the log section of the filesystem should be grown, shrunk, or moved. If you pass -L size, the log section is changed to be that size, if possible. The size is expressed in filesystem blocks. The size of an internal log must be smaller than the size of an allocation group (this value is printed at mkfs(8) time). If neither -i nor -x is given with -l, the log continues to be internal or external as it was before. [NOTE: These options are not implemented] 😭
  • -m β€” specify a new value for the maximum percentage of space in the filesystem that can be allocated as inodes. In mkfs.xfs(8) this is specified with -i maxpct=nn.
  • -n β€” says no change to the filesystem is to be made. The filesystem geometry is printed, and argument checking is performed, but no growth occurs. See the output examples below. (Basically a vibe check, not a surgery 🩺)
  • -r | -R size β€” says the real-time section of the filesystem should be grown. If you pass -R size, the real-time section is grown to that size; otherwise with just -r the real-time section grows to the largest size possible. The size is expressed in filesystem blocks. The filesystem does not need to have contained a real-time section before the xfs_growfs operation. πŸŽ€
  • -t β€” specifies an alternate mount table file (default is /proc/mounts if it exists, else /etc/mtab). This is used when working with filesystems mounted without writing to the /etc/mtab file β€” refer to mount(8) for further details.
  • -V β€” prints the version number and exits. The mount-point argument is not required with -V. 🏁

xfs_growfs is most often used in conjunction with logical volumes (see md(4) and lvm(8) on Linux). BUT it can also be used on a regular disk partition, for example if a partition has been enlarged while retaining the same starting block. Slay 🌈


πŸ‘‘ PRACTICAL USE πŸ‘‘

Filesystems normally occupy all of the space on the device where they reside. So in order to grow a filesystem, it is necessary to provide added space for it to occupy. Therefore there must be at least one spare new disk partition available. Adding the space is often done through the use of a logical volume manager. 🧚

tl;dr: no spare space = nothing to grow into. She can't expand into the void, bestie πŸ’€

🌈 SEE ALSO 🌈

mkfs.xfs(8), xfs_info(8), md(4), lvm(8), mount(8).


k bye ily, this page lives in the System Manager's Manual and it's literally called xfs_growfs(8) πŸ’œπŸ¦‹βœ¨