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
/devIncorrect. pvcreate initializes PV metadata and does not create a VG.
/procCorrect. vgcreate vgdata /dev/sdb1 creates the volume group.
/runIncorrect. lvcreate creates an LV from a VG.
/sysIncorrect. vgs only displays volume-group information.
Try it yourself
An example you can run in a temporary verification environment.
find /sys -maxdepth 1 -type d -printf '%f
' | sort | grep -E '^(block|bus|class|devices|module)$'Expected result
block、bus、class、devices、module等Key points
- vgcreate creates a VG
- The first argument is the VG name
- Following arguments are PVs
Notes
- Environment: Linux sysfs / 読み取り操作
- Prefer read-only inspection or a disposable system when testing hardware commands.
- Device visibility and module behavior depend on the host and virtualization environment.
Foundation review
Place the operation
sysfs is an object-model view; /dev is the access-node namespace.
Check the side effect
Read a device attribute without modifying persistent storage.