[PATCH] Wipe partitions before they are created (#950145)

David Lehman dlehman at redhat.com
Wed May 15 01:34:49 UTC 2013


On Tue, 2013-05-14 at 16:33 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
> 
> If a partition is created in the same position as a previous filesystem,
> eg. a LVM pv, udev will activate it and cause the device to be busy,
> preventing us from using it.
> 
> This uses the parted information from parted to calculate the start of
> the partition and calls dd to write zeros to the first 10MiB of the
> partition.
> 
> This also rescans the pv to make sure things stay in sync with the
> filesystem when creating and removing pvs.

I'd probably call self._wipe() before that try/except block instead of
inside it, but that's just a matter of preference.

This patch is disgusting, but also reeks of robustness. Ack, I guess.




More information about the anaconda-patches mailing list