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