Code review comment for ~raharper/curtin:fix/refactor-preserve-wipe

Revision history for this message
Ryan Harper (raharper) wrote :

Rebasing this branch and thinking on your comments re: default wipe.

I see what you mean w.r.t wipe defaults. Let me work through the scenarios:

For partition creation, we wipe *prior* to creating partitions, explicitly
at the offset where the partition will be created to prevent "buried treasure"
from being discovered by the kernel as soon as we complete partition creation.

Generally this makes wiping after creating a partition overhead if the wipe
mode is superblock; If the mode is zero or superblock-recursive; then
we should follow those instructions and continue to wipe. I dropped this
last part (avoiding the double superblock wipe, so I'll re-add that).

For composed types (like lvm and raid) it's difficult to wipe before they
are created ... however, on raid we inspect raid members, and if they have
existing mdadm metadata we use that to calculate where the data offset
is and zero that.

For raid_handler, we can apply the same skip (only wipe if set and != "superblock"

For LVM, I've not done the work to try to determine where lvm data is stored on pvs;
I'll update this handler to only wipe if it's set.

« Back to merge proposal