]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: make TEST-64 mdadm_lvm cleanup robust against reruns
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 21:16:15 +0000 (22:16 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 4 May 2026 15:51:13 +0000 (16:51 +0100)
commita1d0c58220896e483adbca7386b47f29d30dd09b
treea9a3234434be563b4b49ece5e89ccee00a614bb1
parent4276d3721e4bc4d8d4966b95c106fab1517f188f
test: make TEST-64 mdadm_lvm cleanup robust against reruns

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>
test/units/TEST-64-UDEV-STORAGE.sh