Forrest logo
back to the xfs_growpart tool

hetzner:cloud:volume:resize:xfs

Resize a volume on a Hetzner cloud server (xfs file system)
$ xfs_growpart ${volume}
try on your machine

The command "xfs_growpart" is used to resize an XFS filesystem on a partition to utilize all available space on the block device. The "${volume}" is a placeholder that should be replaced with the specific volume or partition you want to resize.

Here's how the command works:

  1. The "xfs_growpart" command is typically used on Linux systems where XFS is the chosen filesystem.

  2. The command takes the name or path of a volume or partition as an argument. This can be something like "/dev/sda1" or "/dev/mapper/vg-root".

  3. Once the command is executed with the desired volume, it detects the available space on the associated block device.

  4. If there is unallocated space on the block device, the command expands the partition to use that space, thus resizing the filesystem.

  5. If there is no unallocated space on the block device, the command won't have any effect.

It's worth noting that this command only resizes the partition and filesystem and does not resize any logical volumes or underlying storage devices. To ensure all levels of storage are expanded correctly, additional steps may be necessary, such as modifying the partition table or using tools like LVM (Logical Volume Manager) to manage the storage.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the xfs_growpart tool