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.
vgcreate vgdata /dev/sdb1Correct. vgcreate vgdata /dev/sdb1 creates the volume group.
lvcreate vgdata /dev/sdb1Incorrect. lvcreate creates an LV from a VG.
vgs vgdata /dev/sdb1Incorrect. 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 / ヘルプ表示のみ
- Use read-only inspection or a disposable disk when learning storage commands.
- Partition and LVM writes can destroy data; verify the target before running them.
Foundation review
Place the operation
vgcreate builds the middle LVM layer; it does not initialize a PV or create an LV.
Check the side effect
Confirm every supplied PV is intended for the new group.