LFCS Certification Storage Management with LVM 3 — Questions and Answers
Question 1: Which LVM logical volume type stripes data across multiple physical volumes to improve read/write performance?
- Linear LV
- Striped LV (Correct answer)
- Mirror LV
- Thin LV
Correct answer: Striped LV
A striped logical volume distributes data across multiple PVs in chunks, similar to RAID 0, improving throughput.
Question 2: What command creates a striped LV named lv_stripe with 2 stripes of 64KB stripe size from vg0?
- lvcreate -n lv_stripe -L 5G -i 2 -I 64 vg0
- lvcreate -n lv_stripe -L 5G --stripes 2 --stripesize 64K vg0
- lvcreate -n lv_stripe -L 5G -s 2 -S 64K vg0
- Both A and B are correct (Correct answer)
Correct answer: Both A and B are correct
Both -i/-I and --stripes/--stripesize are equivalent syntaxes; stripe size 64 (in KB) requires at least 2 PVs with free extents.
Question 3: In LVM thin provisioning, what is a 'thin pool'?
- A VG with less than 10% free space
- A special LV that provides storage to multiple thinly-provisioned LVs on demand (Correct answer)
- An LV created with reduced redundancy
- A VG spanning fewer than 3 PVs
Correct answer: A special LV that provides storage to multiple thinly-provisioned LVs on demand
A thin pool is a specially-created logical volume that acts as a shared storage reservoir; thin LVs draw actual space from it only when written.
Question 4: Which command creates a thin pool named tp0 of 20G within vg0?
- lvcreate -L 20G --thin vg0/tp0
- lvcreate -L 20G -T vg0/tp0 (Correct answer)
- lvcreate -L 20G --pool tp0 vg0
- thinpool create -L 20G vg0/tp0
Correct answer: lvcreate -L 20G -T vg0/tp0
The -T (or --thin) flag combined with -L and a pool name creates a thin pool logical volume.
Question 5: An LVM snapshot is created but quickly runs out of space. What happens to the original logical volume?
- The original LV becomes read-only
- The snapshot is automatically extended
- The snapshot is invalidated and becomes unusable (Correct answer)
- The original LV is paused until snapshot is deleted
Correct answer: The snapshot is invalidated and becomes unusable
When a classic LVM snapshot exhausts its allocated space, the snapshot is marked invalid (not the origin), and the origin continues operating normally.
Question 6: Which command merges an LVM snapshot back into its origin logical volume?
- lvconvert --merge /dev/vg0/snap_lv (Correct answer)
- lvsync --restore /dev/vg0/snap_lv
- lvrestore /dev/vg0/snap_lv
- vgmerge /dev/vg0/snap_lv
Correct answer: lvconvert --merge /dev/vg0/snap_lv
lvconvert --merge rolls back the origin to the snapshot state; the merge typically completes on next mount or reboot.
Question 7: What does the 'vgchange -a y vg0' command do?
- Activates all logical volumes in volume group vg0 (Correct answer)
- Archives vg0 metadata
- Adds a new PV to vg0 automatically
- Enables auto-resizing on vg0
Correct answer: Activates all logical volumes in volume group vg0
vgchange -a y (--activate y) makes all LVs in the specified VG available by creating device mapper entries.
Which LVM logical volume type stripes data across multiple physical volumes to improve read/write performance?