18.21 Growing an XFS File System


You cannot grow an XFS file system that is currently unmounted.

There is currently no command to shrink an XFS file system.

You can use the xfs_growfs command to increase the size of a mounted XFS file system if there is space on the underlying devices to accommodate the change. The command does not have any effect on the layout or size of the underlying devices. If necessary, use the underlying volume manager to increase the physical storage that is available.

For example, to increase the size of /myxfs1 to 4 TB, assuming a block size of 4 KB:

# xfs_growfs -D 1073741824 /myxfs1

To increase the size of the file system to the maximum size that the underlying device supports, specify the -d option:

# xfs_growfs -d /myxfs1

For more information, see the xfs_growfs(8) manual page.