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: v13.0.2~276^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6909baef542f3cd9b7d97113a6152280e72013f6;p=ceph.git ceph-volume: adds a util.system.unmount function This function will unmount the given path Signed-off-by: Andrew Schoen --- diff --git a/src/ceph-volume/ceph_volume/util/system.py b/src/ceph-volume/ceph_volume/util/system.py index f04f00e130917..2b4473efe62f1 100644 --- a/src/ceph-volume/ceph_volume/util/system.py +++ b/src/ceph-volume/ceph_volume/util/system.py @@ -121,6 +121,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