Question 60
A student has implemented the following configuration: The disposable blank `/dev/vdb` has no partition table, but the lab task needs a GPT disk layout. What repeatable control best reduces regressions or unsafe changes?
Explanation
Correct Answer
Make disk identification a mandatory gate; never run `mklabel` on a disk with live data. This guards against recurrence of: GPT initialization replaces the chosen disk's partition metadata. Confirm the lab's final state by: `parted -s /dev/vdb print` reports `Partition Table: gpt` and existing production disks are unchanged.
Incorrect Answers
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: GPT initialization replaces the chosen disk's partition metadata.
Plan LV resizing and compatible filesystem growth as separate verified steps. That control is best suited to a separate scenario: An online lab volume needs another 1 GiB of block capacity but its administrator attempts to grow the filesystem without changing the LV. It is not the best safeguard for the current mechanism: GPT initialization replaces the chosen disk's partition metadata.
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: GPT initialization replaces the chosen disk's partition metadata.