The LV containing XFS is already extended and mounted at /srv/media.
Grow XFS online to the current size of the lower device.
Which command is appropriate?
xfs_growfs MOUNTPOINT expands a mounted XFS filesystem. It normally takes the mount point rather than the block-device path.
Detailed explanation
resize2fs /dev/vgdata/lvmediaIncorrect. resize2fs is for ext filesystems, not XFS.
xfs_repair /srv/mediaIncorrect. xfs_repair checks and repairs rather than growing the mounted filesystem.
mkfs.xfs /dev/vgdata/lvmediaIncorrect. mkfs.xfs would recreate and potentially destroy the existing filesystem.
xfs_growfs /srv/mediaCorrect. xfs_growfs /srv/media grows the mounted XFS filesystem.
Try it yourself
An example you can run in a temporary verification environment.
xfs_growfs -V 2>&1Expected result
xfs_growfs versionの表示Key points
- xfs_growfs is for XFS
- Specify the mount point
- Online growth is supported
Notes
- Environment: xfsprogs xfs_growfs / バージョン表示のみ
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
Online growth is distinct from offline repair and from creating a new filesystem.
Check the side effect
Verify that the LV has already been extended and the filesystem is mounted.