From: Andrew Schoen Date: Thu, 1 Feb 2018 20:29:30 +0000 (-0600) Subject: ceph-volume: adds a util.system.unmount function X-Git-Tag: v12.2.3~5^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=13f42da7ae449dde84a94f93ac22f8bf0a8c7f79;p=ceph.git ceph-volume: adds a util.system.unmount function This function will unmount the given path Signed-off-by: Andrew Schoen (cherry picked from commit 6909baef542f3cd9b7d97113a6152280e72013f6) --- diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py index 952fa56fe586..4778e0d4f0e8 100644 --- a/src/ceph-volume/ceph_volume/util/system.py +++ b/src/ceph-volume/ceph_volume/util/system.py @@ -119,6 +119,17 @@ class tmp_mount(object): encryption.dmcrypt_close(self.device) +def unmount(path): + """ + Removes mounts at the given path + """ + process.run([ + 'umount', + '-v', + path, + ]) + + def path_is_mounted(path, destination=None): """ Check if the given path is mounted