Create XFS on the empty logical volume /dev/vgdata/lvmedia.
Mounting will be a separate step.
Which command is appropriate?
mkfs.xfs DEVICE creates a new XFS filesystem. Repair, growth, and mounting are separate operations.
Detailed explanation
xfs_repair /dev/vgdata/lvmediaIncorrect. xfs_repair checks or repairs an existing XFS filesystem.
mkfs.xfs /dev/vgdata/lvmediaCorrect. mkfs.xfs creates XFS on the target device.
xfs_growfs /srv/mediaIncorrect. xfs_growfs expands a mounted XFS filesystem.
mount -t xfs /dev/vgdata/lvmedia /srv/mediaIncorrect. mount attaches an existing XFS filesystem.
Try it yourself
An example you can run in a temporary verification environment.
mkfs.xfs -V 2>&1Expected result
mkfs.xfs versionの表示Key points
- mkfs.xfs creates
- xfs_repair repairs
- xfs_growfs grows
Notes
- Environment: xfsprogs 6.x / バージョン表示のみ
- 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
Creation and repair are offline operations; growth uses a separate XFS utility.
Check the side effect
Use a disposable device or version/help output when learning filesystem tools.