Blame SOURCES/bz1777381-Filesystem-1-refresh-UUID.patch

9cf66a
From 18888da3ceef7a56388c89a616485fd8faa392cc Mon Sep 17 00:00:00 2001
9cf66a
From: Roger Zhou <zzhou@suse.com>
9cf66a
Date: Thu, 14 Nov 2019 17:52:13 +0800
9cf66a
Subject: [PATCH] Filesystem: refresh UUID in the start phase
9cf66a
9cf66a
In the case a fresh filesystem is just created from another node on the
9cf66a
shared storage, is not visible yet. Then try partprobe to refresh
9cf66a
/dev/disk/by-uuid/* up to date.
9cf66a
9cf66a
Signed-off-by: Roger Zhou <zzhou@suse.com>
9cf66a
---
9cf66a
 heartbeat/Filesystem | 8 ++++++++
9cf66a
 1 file changed, 8 insertions(+)
9cf66a
9cf66a
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
9cf66a
index e66ddc77f..543986441 100755
9cf66a
--- a/heartbeat/Filesystem
9cf66a
+++ b/heartbeat/Filesystem
9cf66a
@@ -454,6 +454,14 @@ Filesystem_start()
9cf66a
 	#       accordingly
9cf66a
 
9cf66a
 	if [ $blockdevice = "yes" ]; then
9cf66a
+		if [ "$DEVICE" != "/dev/null" -a ! -b "$DEVICE" ] ; then
9cf66a
+			# In the case a fresh filesystem is just created
9cf66a
+			# from another node on the shared storage, and
9cf66a
+			# is not visible yet. Then try partprobe to
9cf66a
+			# refresh /dev/disk/by-uuid/* up to date.
9cf66a
+			have_binary partprobe && partprobe >/dev/null 2>&1
9cf66a
+		fi
9cf66a
+
9cf66a
 		if [ "$DEVICE" != "/dev/null" -a ! -b "$DEVICE" ] ; then
9cf66a
 			ocf_exit_reason "Couldn't find device [$DEVICE]. Expected /dev/??? to exist"
9cf66a
 			exit $OCF_ERR_INSTALLED