rbd: skip unmap if device is not mapped
This commit is contained in:
committed by
Dietmar Maurer
parent
c2c312175b
commit
b50812f941
@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user