mediumMultiple Choice
XK0-006 Practice Question: Extend the size of a logical volume named…
An administrator needs to extend the size of a logical volume named 'lv_data' in volume group 'vg_data' by 10 GB. A new disk /dev/sdb has been added to the system. What is the correct sequence of commands?
⚠ Common exam trap
Many candidates assume lvextend can be run first because they think the volume group already has space, but the question explicitly states a new disk must be added, so the correct order requires preparing the disk and volume group before extending the logical volume.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
pvcreate /dev/sdb; vgextend vg_data /dev/sdb; lvextend -L +10G /dev/vg_data/lv_data
It follows the proper sequence for extending a logical volume when a new disk is added: first, initialize the new disk as a physical volume with pvcreate; second, add the physical volume to the volume group with vgextend; third, extend the logical volume by the desired size with lvextend. This order ensures the volume group has available physical extents before attempting to allocate them to the logical volume.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
pvcreate /dev/sdb; vgextend vg_data /dev/sdb; lvextend -L +10G /dev/vg_data/lv_data
Why this is correct
Initialising /dev/sdb with pvcreate makes it a physical volume, then vgextend adds it to vg_data, supplying the free extents the 10 GB growth requires. lvextend -L +10G then extends lv_data by exactly 10 GB within that enlarged group, satisfying the stem's sequence and size constraint.
- ✗
lvextend -L +10G /dev/vg_data/lv_data; vgextend vg_data /dev/sdb; pvcreate /dev/sdb
Why it's wrong here
The order is wrong: pvcreate must initialise /dev/sdb before vgextend adds it, and the volume group must be extended before lvextend can claim the space. It is tempting because all three commands genuinely belong to the procedure, and the sequence would be correct if reordered as pvcreate, vgextend, then lvextend.
- ✗
vgextend vg_data /dev/sdb; pvcreate /dev/sdb; lvextend -L +10G /dev/vg_data/lv_data
Why it's wrong here
vgextend runs before pvcreate, so the volume group cannot accept /dev/sdb as a physical volume — the disk has no PV metadata yet, and vgextend fails. It is tempting because vgextend is genuinely the step that adds storage to a VG, which is correct once pvcreate has initialised the disk.
- ✗
pvcreate /dev/sdb; lvextend -L +10G /dev/vg_data/lv_data; vgextend vg_data /dev/sdb
Why it's wrong here
lvextend executes before vgextend, so vg_data still lacks the free extents from /dev/sdb and the +10G request fails for insufficient space. It is tempting because pvcreate is correctly placed first and lvextend is the command that actually grows the LV, but the VG must be extended beforehand.
Go deeper
Related to this question
Learn chapter
User and Group Administration
Key term
Physical volume
A physical volume is a storage device or partition that is initialized for use by a volume manager, allowing it to be combined into logical storage pools.
Key term
Volume group
A volume group is a pool of storage capacity created by grouping one or more physical volumes in Linux LVM that can be carved into logical volumes.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.