aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-02-20 17:58:42 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2011-02-20 17:58:42 -0500
commitf40b9c0c67197fbc7ceb39623487c4cc1794d270 (patch)
tree842dd04c81ba2269c2b81b30ed8cbda65bdca26e
parent3348188b6da4fcf2fbc76a564a579ae30df2ba0e (diff)
downloadkvm-manager-f40b9c0c67197fbc7ceb39623487c4cc1794d270.tar.gz
kvm-manager-f40b9c0c67197fbc7ceb39623487c4cc1794d270.tar.bz2
trigger udev updates on lvm devices
-rwxr-xr-xkvm-manager7
1 files changed, 7 insertions, 0 deletions
diff --git a/kvm-manager b/kvm-manager
index 8b96f0e..9f445ec 100755
--- a/kvm-manager
+++ b/kvm-manager
@@ -47,6 +47,13 @@ up() {
BOOTCHOICE=d
fi
+ for disk in "$HDA" "$HDB" "HDC" "HDD"; do
+ if printf "%s" "$disk" | grep '^/dev/mapper/'; then
+ mappername=$(printf "%s" "$disk" | sed 's!^/dev/mapper/!!')
+ udevadm trigger --subsystem-match=block --attr-match=dm/name="$mappername"
+ fi
+ done
+
# set up the disks, if needed:
[ -z "$HDA" ] || KVMARGS="$KVMARGS -drive file=$HDA,if=virtio,id=hda,boot=on,format=raw"
[ -z "$HDB" ] || KVMARGS="$KVMARGS -drive file=$HDB,if=virtio,id=hdb,format=raw"