[CEPH] Fix a race condition with udev on OSD start
Under some conditions udev may not trigger correctly and create the proper uuid symlinks required by Ceph. In order to work around this we manually create the symlinks. Change-Id: Icadce2c005864906bcfdae4d28117628c724cc1c
This commit is contained in:
parent
958127477d
commit
b0da8d78d1
@ -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}
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user