Question 420
For this Linux administration lab: A test operator removed a block LV without first unmounting it, risking a busy-device error or data loss. Which safety and lifecycle check best prevents the same problem returning?
Explanation
Correct Answer
Require unmount, backup and dependency review before LV retirement. This guards against recurrence of: LVM deletion removes logical block storage and must not occur while live mounts depend on it. Confirm the lab's final state by: `lvs vg_training` no longer lists the retired LV and unrelated LVs remain.
Incorrect Answers
Check `vgs` free extents before provisioning and keep names consistent with service inventory. That control is best suited to a separate scenario: An LVM volume group `vg_training` exists and a test database requires a new 2 GiB logical volume. It is not the best safeguard for the current mechanism: LVM deletion removes logical block storage and must not occur while live mounts depend on it.
Plan allocations with PV placement requirements as well as aggregate capacity. That control is best suited to a separate scenario: A training PV reports little free space while its VG appears to have ample total capacity across a second PV. It is not the best safeguard for the current mechanism: LVM deletion removes logical block storage and must not occur while live mounts depend on it.
Perform non-destructive detection before initializing any storage metadata. That control is best suited to a separate scenario: A newly attached block device is not visible to LVM because it is not yet recognized by the kernel. It is not the best safeguard for the current mechanism: LVM deletion removes logical block storage and must not occur while live mounts depend on it.