|
|
38c30a |
From d9b46474fc19d9c57e2cfb752d60319017da8410 Mon Sep 17 00:00:00 2001
|
|
|
38c30a |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
38c30a |
Date: Wed, 6 Apr 2022 14:14:19 +0200
|
|
|
38c30a |
Subject: [PATCH] Filesystem: improve logic for UUID/label and add note that
|
|
|
38c30a |
/dev/disk/by-{uuid,label}/ are preferred on Linux
|
|
|
38c30a |
|
|
|
38c30a |
---
|
|
|
38c30a |
heartbeat/Filesystem | 8 +++++---
|
|
|
38c30a |
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
38c30a |
|
|
|
38c30a |
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
|
|
38c30a |
index 72a1b8623..44270ad98 100755
|
|
|
38c30a |
--- a/heartbeat/Filesystem
|
|
|
38c30a |
+++ b/heartbeat/Filesystem
|
|
|
38c30a |
@@ -163,6 +163,8 @@ directory where the status file is to be placed.
|
|
|
38c30a |
<parameter name="device" required="1">
|
|
|
38c30a |
<longdesc lang="en">
|
|
|
38c30a |
The name of block device for the filesystem, or -U, -L options for mount, or NFS mount specification.
|
|
|
38c30a |
+
|
|
|
38c30a |
+NOTE: On Linux /dev/disk/by-{uuid,label}/ are preferred to -U/-L.
|
|
|
38c30a |
</longdesc>
|
|
|
38c30a |
<shortdesc lang="en">block device</shortdesc>
|
|
|
38c30a |
<content type="string" default="${OCF_RESKEY_device_default}" />
|
|
|
38c30a |
@@ -902,11 +904,11 @@ set_blockdevice_var() {
|
|
|
38c30a |
fi
|
|
|
38c30a |
|
|
|
38c30a |
case "$DEVICE" in
|
|
|
38c30a |
- --*) # Typically --uuid or --label
|
|
|
38c30a |
- device_opt=$(echo $DEVICE | sed -E "s/([[:blank:]]|=).*//")
|
|
|
38c30a |
+ --uuid=*|--uuid\ *|--label=*|--label\ *)
|
|
|
38c30a |
+ device_opt=$(echo $DEVICE | sed "s/\([[:blank:]]\|=\).*//")
|
|
|
38c30a |
DEVICE=$(echo $DEVICE | sed -E "s/$device_opt([[:blank:]]*|=)//")
|
|
|
38c30a |
;;
|
|
|
38c30a |
- -*) # Oh... An option to mount instead... Typically -U or -L
|
|
|
38c30a |
+ -U*|-L*) # short versions of --uuid/--label
|
|
|
38c30a |
device_opt=$(echo $DEVICE | cut -c1-2)
|
|
|
38c30a |
DEVICE=$(echo $DEVICE | sed "s/$device_opt[[:blank:]]*//")
|
|
|
38c30a |
;;
|