Create a new volume group named vgdata from initialized PV /dev/sdb1.
Which command is appropriate?
vgcreate VG PV... groups one or more initialized physical volumes under a new VG name.
Detailed explanation
pvcreate vgdata /dev/sdb1Incorrect. pvcreate initializes PV metadata and does not create a VG.
Incorrect. pvcreate initializes PV metadata and does not create a VG.
vgcreate vgdata /dev/sdb1Correct. vgcreate vgdata /dev/sdb1 creates the volume group.
Correct. vgcreate vgdata /dev/sdb1 creates the volume group.
lvcreate vgdata /dev/sdb1Incorrect. lvcreate creates an LV from a VG.
Incorrect. lvcreate creates an LV from a VG.
vgs vgdata /dev/sdb1Incorrect. vgs only displays volume-group information.
Incorrect. vgs only displays volume-group information.
Try it yourself
An example you can run in a temporary verification environment.
vgcreate --help 2>&1 | sed -n '1,14p'Expected result
Volume Group名とPhysical Volumeを受け取る使用法Key points
- vgcreate creates a VG
- The first argument is the VG name
- Following arguments are PVs
Notes
- Environment: LVM2 / ヘルプ表示のみ
- 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.