xfs_growfs
Enlarge an XFS filesystem
SYNOPSIS
xfs_growfs [ -dilnrx ] [ -e extent-size ] [ -L log-size ] [ -m mount-point ] filesystem
PARAMETERS
-d
Expand only the data section of the filesystem.
This prevents allocation of new inode table space, which is useful if only data capacity is needed.
-e extent-size
Specifies the new extent size for the filesystem.
The extent size determines the granularity of space allocation. This requires unmounting the filesystem.
-L log-size
Specifies the new size of the internal log for the filesystem.
This requires unmounting the filesystem.
-m mount-point
Specifies the mount point of the XFS filesystem to be grown.
This is an alternative to specifying the device directly and will try to use the root of the selected device.
-n
No-operation mode.
Print what would happen without actually modifying the filesystem.
-r
Realtime section resize.
Used to expand the realtime section of the filesystem. This requires unmounting the filesystem.
-i
Inplace Only mode.
Attempt only inplace resize, will not move metadata.
-l
List supported features.
List all supported options.
-x
Enable debug logging.
Print debug information to the console.
filesystem
The device name of the XFS filesystem to be grown (e.g., /dev/sda1).
Required unless -m is used.
DESCRIPTION
The xfs_growfs
command resizes an existing XFS filesystem. It is used to expand the filesystem to utilize newly added space on the underlying storage device. This is commonly needed after expanding a virtual disk, resizing a logical volume, or replacing a physical disk with a larger one. The command analyzes the filesystem and determines the necessary adjustments to its metadata and data structures to incorporate the additional space. xfs_growfs
can operate on mounted XFS filesystems without requiring them to be unmounted. This feature significantly reduces downtime and simplifies the expansion process. The command performs its operations in place, modifying the filesystem structures directly. Proper backups should be taken before using xfs_growfs
as with any operation that modifies data structures directly. When used on a mounted filesystem, the command typically waits until all pending I/O operations have completed before initiating the resize, minimizing the risk of data corruption. The default mode expands the root directory on the device, but options allow expansion of other directories, or specific device usage.
CAVEATS
Growing a filesystem after a hardware failure might result in data loss. Always back up your data before performing such operations. Using -e or -L requires the filesystem to be unmounted. Incorrect extent sizes can affect performance.
EXIT STATUS
xfs_growfs
returns 0 on success and a non-zero value on failure.
HISTORY
xfs_growfs
has been a part of the XFS filesystem utilities package since its inception. XFS was initially developed by Silicon Graphics (SGI) in the early 1990s and was known for its scalability and performance. xfs_growfs
was crucial for managing storage efficiently as XFS adoption grew in enterprise environments.
SEE ALSO
mkfs.xfs(8), xfsdump(8), xfsrestore(8)