Question 260
For this Linux administration lab: An LVM volume group `vg_training` exists and a test database requires a new 2 GiB logical volume. Which safety and lifecycle check best prevents the same problem returning?
Explanation
Correct Answer
Check `vgs` free extents before provisioning and keep names consistent with service inventory. This guards against recurrence of: An LVM logical volume is a block device until it is formatted and mounted separately. Confirm the lab's final state by: `lvs /dev/vg_training/lv_db` reports the requested LV and does not show a filesystem automatically.
Incorrect Answers
Use stable UUID or labels for persistent mounts and run `findmnt --verify` before reboot. That control is best suited to a separate scenario: A server has an approved lab LV mounted through `/dev/vdb1` and the device name changes after adding another disk. It is not the best safeguard for the current mechanism: An LVM logical volume is a block device until it is formatted and mounted separately.
Verify final filesystem size and document that XFS supports growth but not shrink. That control is best suited to a separate scenario: An administrator wants to grow a logical volume and its XFS filesystem together for a disposable data directory. It is not the best safeguard for the current mechanism: An LVM logical volume is a block device until it is formatted and mounted separately.
Verify extent allocation and redundancy before any VG reduction. That control is best suited to a separate scenario: A dedicated LVM physical volume is no longer used by any allocated extents but remains listed in a training VG. It is not the best safeguard for the current mechanism: An LVM logical volume is a block device until it is formatted and mounted separately.