diff --git a/ceph-osd/templates/bin/osd/_block.sh.tpl b/ceph-osd/templates/bin/osd/_block.sh.tpl index 362c2f65d..a69f2ee81 100644 --- a/ceph-osd/templates/bin/osd/_block.sh.tpl +++ b/ceph-osd/templates/bin/osd/_block.sh.tpl @@ -49,8 +49,7 @@ CEPH_DISK_OPTIONS="" CEPH_OSD_OPTIONS="" DATA_UUID=$(blkid -o value -s PARTUUID ${OSD_DEVICE}*1) -# watch the udev event queue, and exit if all current events are handled -udevadm settle --timeout=600 +udev_settle DATA_PART=$(dev_part ${OSD_DEVICE} 1) MOUNTED_PART=${DATA_PART} diff --git a/ceph-osd/templates/bin/osd/_common.sh.tpl b/ceph-osd/templates/bin/osd/_common.sh.tpl index 96da6c937..f88243e9e 100644 --- a/ceph-osd/templates/bin/osd/_common.sh.tpl +++ b/ceph-osd/templates/bin/osd/_common.sh.tpl @@ -153,7 +153,16 @@ function osd_pg_interval_fix { function udev_settle { partprobe "${OSD_DEVICE}" + if [ "x$JOURNAL_TYPE" == "xblock-logical" ]; then + partprobe "${OSD_JOURNAL}" + fi # watch the udev event queue, and exit if all current events are handled udevadm settle --timeout=600 + + # On occassion udev may not make the correct device symlinks for Ceph, just in case we make them manually + mkdir -p /dev/disk/by-partuuid + for dev in $(blkid -o device | grep -v block); do + ln -s "../../$(echo ${dev} | awk -F '/' '{print $3}')" "/dev/disk/by-partuuid/$(blkid -o value -s PARTUUID ${dev})" || true + done }