if not system.path_is_mounted(osd_path):
# mkdir -p and mount as tmpfs
prepare_utils.create_osd_path(osd_id, tmpfs=True)
-
- process.run([
- 'sudo', 'ceph-bluestore-tool',
- 'prime-osd-dir', '--dev', osd_lv.lv_path,
- '--path', osd_path])
+ # if the osd dir was not mounted via tmpfs, it means that the files are
+ # gone, so it needs to be 'primed' again. The command would otherwise
+ # fail if the directory was already populated
+ process.run([
+ 'sudo', 'ceph-bluestore-tool',
+ 'prime-osd-dir', '--dev', osd_lv.lv_path,
+ '--path', osd_path])
# always re-do the symlink regardless if it exists, so that the block,
# block.wal, and block.db devices that may have changed can be mapped
# correctly every time