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.
Incorrect. xfs_repair checks or repairs an existing XFS filesystem.
mkfs.xfs /dev/vgdata/lvmediaCorrect. mkfs.xfs creates XFS on the target device.
Correct. mkfs.xfs creates XFS on the target device.
xfs_growfs /srv/mediaIncorrect. xfs_growfs expands a mounted XFS filesystem.
Incorrect. xfs_growfs expands a mounted XFS filesystem.
mount -t xfs /dev/vgdata/lvmedia /srv/mediaIncorrect. mount attaches an existing XFS filesystem.
Incorrect. 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 / バージョン表示のみ
- 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.