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.
btrfs check /dev/vgdata/lvprojectsIncorrect. btrfs check examines an existing Btrfs filesystem.
mkfs.btrfs /dev/vgdata/lvprojectsCorrect. mkfs.btrfs creates Btrfs on the device.
mount -t btrfs /dev/vgdata/lvprojects /srv/projectsIncorrect. 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 / バージョン表示のみ
- 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
filesystem show and check inspect an existing filesystem; mkfs initializes new metadata.
Check the side effect
Never run a mkfs command on a device whose contents must be preserved.