From c61aea41f1d07b824e169bf12328b7eb0055e23f Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 9 Aug 2017 15:24:15 -0400 Subject: [PATCH] ceph-volume: lvm activate should check if the device is mounted to prevent errors from mount Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/devices/lvm/activate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index 1f0de1717c53c..7787aabd18bfd 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): -- 2.39.5