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.
Incorrect. pvcreate initializes a PV.
/devIncorrect. vgcreate creates a VG rather than an LV.
Incorrect. vgcreate creates a VG rather than an LV.
/sysCorrect. lvcreate -L 20G -n lvlogs vgdata creates the requested LV.
Correct. lvcreate -L 20G -n lvlogs vgdata creates the requested LV.
/mediaIncorrect. lvs queries existing LVs and does not create one.
Incorrect. 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 / 読み取り操作
- 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.