resize-rootfs: wait for partition table to reload

partprobe triggers reloading partition table, but apparently it isn't
guaranteed udev re-create device nodes at the time it finishes. This may lead
to /dev/mapper/dmroot pointing to nowhere. Fix this by calling udevadm settle
after reloading partition table.
This commit is contained in:
Marek Marczykowski-Górecki 2019-10-01 18:38:18 -05:00
parent 2dbdb1e66f
commit 2dcaebd110
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -13,6 +13,7 @@ case "$(stat -Lc %t:%T /dev/mapper/dmroot)" in
# and reload partition table; prefer partprobe over blockdev
# --rereadpt, as it works on mounted partitions
partprobe /dev/xvda
udevadm settle
;;
ca:*)
echo "Unsupported partition layout, resize it manually" >&2