mirror of
https://github.com/systemd/systemd.git
synced 2026-08-12 22:17:19 +00:00
mdadm --zero-superblock only wipes the MD metadata on the underlying disks, not the LVM PV header that lives in the array data area. When the VM is restarted and the test re-creates the array with the same UUID, /dev/md127 exposes the old data including the LVM PV header, so udev's 69-lvm.rules auto-triggers lvm-activate-mdlvm_vg.service which races with the test's own pvcreate for exclusive access on /dev/md127. Wipe the LVM signature off the MD device (and the underlying disks as a belt-and-braces measure) to avoid the race on re-run, fixing failures when the VM is rebooted instead of shut down. Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com> (cherry picked from commita1d0c58220) (cherry picked from commitab49b6eb7f)