Skip to content

Commit

Permalink
ceph-volume: lvm activate should check if the device is mounted to pr…
Browse files Browse the repository at this point in the history
…event errors from mount

Signed-off-by: Alfredo Deza <adeza@redhat.com>
  • Loading branch information
Alfredo Deza committed Aug 9, 2017
1 parent d77d86a commit c61aea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ceph-volume/ceph_volume/devices/lvm/activate.py
Expand Up @@ -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):
Expand Down

0 comments on commit c61aea4

Please sign in to comment.