From: Yu Watanabe Date: Wed, 10 Sep 2025 12:45:56 +0000 (+0900) Subject: TEST-64-UDEV-STORAGE: forcibly create new physical volume X-Git-Tag: v257.10~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0a58d01590f91b81780fc418d598a44234d5e6b;p=thirdparty%2Fsystemd.git 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) --- 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