From: Alfredo Deza Date: Wed, 9 Aug 2017 19:24:15 +0000 (-0400) Subject: ceph-volume: lvm activate should check if the device is mounted to prevent errors... X-Git-Tag: v12.1.3~5^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58123d109af8eadb68c84086ca4020ee6890d3e3;p=ceph.git ceph-volume: lvm activate should check if the device is mounted to prevent errors from mount Signed-off-by: Alfredo Deza (cherry picked from commit c61aea41f1d07b824e169bf12328b7eb0055e23f) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index 1f0de1717c53..7787aabd18bf 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -28,7 +28,8 @@ def activate_filestore(lvs): # mount the osd source = osd_lv.lv_path destination = '/var/lib/ceph/osd/%s-%s' % (conf.cluster, osd_id) - process.run(['sudo', 'mount', '-v', source, destination]) + if not system.is_mounted(source, destination=destination): + process.run(['sudo', 'mount', '-v', source, destination]) # ensure that the symlink for the journal is there if not os.path.exists(osd_journal):