diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index 9e84266..7b1ab1b 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -494,6 +494,10 @@ sub activate_volume { return 1 if !$scfg->{krbd}; my ($vtype, $name, $vmid) = $class->parse_volname($volname); + my $pool = $scfg->{pool} ? $scfg->{pool} : 'rbd'; + + my $path = "/dev/rbd/$pool/$name"; + return if -b $path; my $cmd = &$rbd_cmd($scfg, $storeid, 'map', $name); run_rbd_command($cmd, errmsg => "can't mount rbd volume $name"); diff --git a/changelog.Debian b/changelog.Debian index b27ad47..6fe4896 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -2,6 +2,8 @@ libpve-storage-perl (4.0-21) unstable; urgency=medium * rbd: skip unmap if device is not mapped + * rbd: make activate_volume idempotent + -- Proxmox Support Team Thu, 10 Sep 2015 10:43:35 +0200 libpve-storage-perl (4.0-20) unstable; urgency=medium