Question 500
For this Linux administration lab: A small swap logical volume on a training host is inactive after it has been created. Which safety and lifecycle check best prevents the same problem returning?
Explanation
Correct Answer
Record persistent swap configuration separately so availability survives reboot. This guards against recurrence of: A logical volume is not active swap until formatted with swap metadata and enabled. Confirm the lab's final state by: `swapon --show` lists the intended swap device and `free -h` reflects its capacity.
Incorrect Answers
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: A logical volume is not active swap until formatted with swap metadata and enabled.
Record PV mapping before hardware maintenance and always verify device identification. That control is best suited to a separate scenario: An administrator needs to identify the data-bearing PVs behind an LV without relying on its friendly name. It is not the best safeguard for the current mechanism: A logical volume is not active swap until formatted with swap metadata and enabled.
Audit swap entries and device UUIDs after storage migrations. That control is best suited to a separate scenario: A previously working swap LV disappears after restart because no persistent swap entry was configured. It is not the best safeguard for the current mechanism: A logical volume is not active swap until formatted with swap metadata and enabled.