Create Btrfs on the empty block device /dev/vgdata/lvprojects.
Which command is appropriate?
mkfs.btrfs DEVICE creates the Btrfs superblock and initial structures. Recheck the target if it already has a signature.
Detailed explanation
btrfs filesystem show /dev/vgdata/lvprojectsIncorrect. btrfs filesystem show queries an existing filesystem.
Incorrect. btrfs filesystem show queries an existing filesystem.
btrfs check /dev/vgdata/lvprojectsIncorrect. btrfs check examines an existing Btrfs filesystem.
Incorrect. btrfs check examines an existing Btrfs filesystem.
mkfs.btrfs /dev/vgdata/lvprojectsCorrect. mkfs.btrfs creates Btrfs on the device.
Correct. mkfs.btrfs creates Btrfs on the device.
mount -t btrfs /dev/vgdata/lvprojects /srv/projectsIncorrect. mount attaches an already-created Btrfs filesystem.
Incorrect. mount attaches an already-created Btrfs filesystem.
Try it yourself
An example you can run in a temporary verification environment.
mkfs.btrfs --version 2>&1Expected result
btrfs-progsのmkfs.btrfsバージョンKey points
- mkfs.btrfs creates
- btrfs check verifies
- Confirm the target first
Notes
- Environment: btrfs-progs 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.