From d0a58d01590f91b81780fc418d598a44234d5e6b Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 10 Sep 2025 21:45:56 +0900 Subject: [PATCH] TEST-64-UDEV-STORAGE: forcibly create new physical volume When the test VM is accidentally rebooted, there exists the previously created volume, and the command fails with the following: ``` TEST-64-UDEV-STORAGE.sh[282]: + lvm pvcreate -y /dev/md/mdlvm TEST-64-UDEV-STORAGE.sh[442]: Can't initialize physical volume "/dev/md127" of volume group "mdlvm_vg" without -ff TEST-64-UDEV-STORAGE.sh[442]: /dev/md127: physical volume not initialized. [FAILED] Failed to start TEST-64-UDEV-STORAGE-mdadm_lvm.service. ``` Let's ignore the existence of previous volume and forcibly create new one. Workaround for issue #38240. (cherry picked from commit 8685f8edd17a5e465bf05d733ac22c010c464938) --- test/units/TEST-64-UDEV-STORAGE.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/TEST-64-UDEV-STORAGE.sh b/test/units/TEST-64-UDEV-STORAGE.sh index 7ee606e6975..c29731e6232 100755 --- a/test/units/TEST-64-UDEV-STORAGE.sh +++ b/test/units/TEST-64-UDEV-STORAGE.sh @@ -1295,7 +1295,7 @@ testcase_mdadm_lvm() { printf 'y\ny\n' | mdadm --create "$raid_dev" --name "$raid_name" --uuid "$uuid" /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm{0..3} -v -f --level=10 --raid-devices=4 udevadm wait --settle --timeout=30 "$raid_dev" # Create an LVM on the MD - lvm pvcreate -y "$raid_dev" + lvm pvcreate -y -ff "$raid_dev" lvm pvs lvm vgcreate "$vgroup" -y "$raid_dev" lvm vgs -- 2.47.3