Allocate 20 GiB from vgdata and create an LV named lvlogs.
Which command is appropriate?
lvcreate -L SIZE -n NAME VG allocates the requested capacity from the VG and creates the logical volume.
Detailed explanation
/procIncorrect. pvcreate initializes a PV.
/devIncorrect. vgcreate creates a VG rather than an LV.
/sysCorrect. lvcreate -L 20G -n lvlogs vgdata creates the requested LV.
/mediaIncorrect. lvs queries existing LVs and does not create one.
Try it yourself
An example you can run in a temporary verification environment.
test -r /proc/cpuinfo -a -r /proc/meminfo -a -d /proc/$$ && printf 'procfs available
'Expected result
procfs availableKey points
- lvcreate creates an LV
- -L sets size
- -n sets the LV name
Notes
- Environment: Linux procfs / 読み取り操作
- 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
procfs is dynamic runtime information, not a normal disk-backed directory.
Check the side effect
Read cpuinfo or meminfo and avoid writes unless the setting is intentional.