TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink

On CentOS 9:
```
TEST-64-UDEV-STORAGE.sh[522]: + mdadm -v --zero-superblock --force /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm0 ...
TEST-64-UDEV-STORAGE.sh[1014]: mdadm: Unrecognised md component device - /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm4
```

This also adds `udevadm settle` before clearing superblocks for safety.

Follow-up for 5ad6fe9850.
This commit is contained in:
Yu Watanabe
2025-08-05 03:48:55 +09:00
committed by Luca Boccassi
parent 406d8cb029
commit 3d4977a12b

View File

@@ -1259,7 +1259,9 @@ EOF
# Clear superblocks to make the MD device will not be restarted even if the VM is restarted.
# This is a workaround for issue #38240.
mdadm -v --zero-superblock --force "${devices[@]}"
udevadm settle --timeout=30
# shellcheck disable=SC2046
mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}")
udevadm settle --timeout=30
# Check if all expected symlinks were removed after the cleanup
@@ -1322,7 +1324,9 @@ testcase_mdadm_lvm() {
# Clear superblocks to make the MD device will not be restarted even if the VM is restarted.
# This is a workaround for issue #38240.
mdadm -v --zero-superblock --force "${devices[@]}"
udevadm settle --timeout=30
# shellcheck disable=SC2046
mdadm -v --zero-superblock --force $(readlink -f "${devices[@]}")
udevadm settle --timeout=30
# Check if all expected symlinks were removed after the cleanup