1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

test-64-storage: add test for renaming lvm volume

This commit is contained in:
Yu Watanabe 2022-09-01 04:12:25 +09:00
parent 9c126b2c92
commit ede0fe0271

View File

@ -409,6 +409,22 @@ testcase_lvm_basic() {
helper_check_device_symlinks "/dev/disk" "/dev/$vgroup"
helper_check_device_units
# Rename partitions (see issue #24518)
lvm lvrename "/dev/$vgroup/mypart1" renamed1
lvm lvrename "/dev/$vgroup/mypart2" renamed2
udevadm wait --settle --timeout="$timeout" --removed "/dev/$vgroup/mypart1" "/dev/$vgroup/mypart2"
udevadm wait --settle --timeout="$timeout" "/dev/$vgroup/renamed1" "/dev/$vgroup/renamed2"
helper_check_device_symlinks "/dev/disk" "/dev/$vgroup"
helper_check_device_units
# Rename them back
lvm lvrename "/dev/$vgroup/renamed1" mypart1
lvm lvrename "/dev/$vgroup/renamed2" mypart2
udevadm wait --settle --timeout="$timeout" --removed "/dev/$vgroup/renamed1" "/dev/$vgroup/renamed2"
udevadm wait --settle --timeout="$timeout" "/dev/$vgroup/mypart1" "/dev/$vgroup/mypart2"
helper_check_device_symlinks "/dev/disk" "/dev/$vgroup"
helper_check_device_units
# Disable the VG and check symlinks...
lvm vgchange -an "$vgroup"
udevadm wait --settle --timeout="$timeout" --removed "/dev/$vgroup" "/dev/disk/by-label/mylvpart1"