]> git.proxmox.com Git - pve-manager.git/commitdiff
ceph: try to unmount OSD after removal
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 3 Jan 2014 09:58:08 +0000 (10:58 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 3 Jan 2014 09:58:08 +0000 (10:58 +0100)
PVE/API2/Ceph.pm

index 8639287ee263003e23889eb3a3501685893f8e4e..e6bc09cde1372a91be3db2f41d304ac4090d518f 100644 (file)
@@ -1249,6 +1249,12 @@ __PACKAGE__->register_method ({
 
            print "Remove OSD $osdsection\n";
            &$run_ceph_cmd(['osd', 'rm', $osdid]);
+
+           # try to unmount fro standard mount point
+           my $mountpoint = "/var/lib/ceph/osd/ceph-$osdid";
+           print "Unmount OSD $osdsection from  $mountpoint\n";
+           eval { run_command(['umount', $mountpoint]); };
+           warn $@ if $@;
        };
 
        return $rpcenv->fork_worker('cephdestroyosd', $osdsection,  $authuser, $worker);