From af39017b9333dcbadee2a15f3829667f2b18fb45 Mon Sep 17 00:00:00 2001 From: Roger Zhou Date: Fri, 20 Dec 2019 23:28:45 +0800 Subject: [PATCH 1/2] Filesystem: respect udevd need time to create UUID symlinks To refresh the filesystem UUID, there is a race condition. partprobe might return before the UUID symlink get created. Particularly, when the system has many devices, the udev daemon could need visible time to process the udev event queue. Hence, wait udev for a moment. Signed-off-by: Roger Zhou --- heartbeat/Filesystem | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem index 543986441..c21ad5761 100755 --- a/heartbeat/Filesystem +++ b/heartbeat/Filesystem @@ -460,6 +460,10 @@ Filesystem_start() # is not visible yet. Then try partprobe to # refresh /dev/disk/by-uuid/* up to date. have_binary partprobe && partprobe >/dev/null 2>&1 + local timeout + timeout=${OCF_RESKEY_CRM_meta_timeout:="60000"} + timeout=$((timeout/1000)) + have_binary udevadm && udevadm settle -t $timeout --exit-if-exists=$DEVICE fi if [ "$DEVICE" != "/dev/null" -a ! -b "$DEVICE" ] ; then From a9fb8077c8201b287ee0486b2a34db4b7d4d8f5d Mon Sep 17 00:00:00 2001 From: Roger Zhou Date: Wed, 25 Dec 2019 15:45:03 +0800 Subject: [PATCH 2/2] Filesystem: add trigger_udev_rules_if_need() for -U, -L, or /dev/xxx device DEVICE parameter of this RA accepts "-U " and "-L