]> git.proxmox.com Git - pve-storage.git/commitdiff
rbd: skip unmap if device is not mapped
authorWolfgang Link <w.link@proxmox.com>
Thu, 10 Sep 2015 08:29:10 +0000 (10:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 10 Sep 2015 08:41:54 +0000 (10:41 +0200)
PVE/Storage/RBDPlugin.pm

index ae6ed538db3867e5b7b81c6d496a50a00f617777..9e8426687906b4f19a002a253bed44b909271eab 100644 (file)
@@ -510,6 +510,8 @@ sub deactivate_volume {
     my $pool =  $scfg->{pool} ? $scfg->{pool} : 'rbd';
 
     my $path = "/dev/rbd/$pool/$name";
+    return if ! -b $path;
+
     my $cmd = &$rbd_cmd($scfg, $storeid, 'unmap', $path);
     run_rbd_command($cmd, errmsg => "can't unmount rbd volume $name");