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.
Incorrect. resize2fs is for ext filesystems, not XFS.
xfs_repair /srv/mediaIncorrect. xfs_repair checks and repairs rather than growing the mounted filesystem.
Incorrect. 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.
Incorrect. mkfs.xfs would recreate and potentially destroy the existing filesystem.
xfs_growfs /srv/mediaCorrect. xfs_growfs /srv/media grows the mounted XFS filesystem.
Correct. 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 / バージョン表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.