|
|
cd5454 |
From e2174244067b02d798e0f12437f0f499c80f91fe Mon Sep 17 00:00:00 2001
|
|
|
cd5454 |
From: Reid Wahl <nrwahl@protonmail.com>
|
|
|
cd5454 |
Date: Tue, 1 Feb 2022 18:55:47 -0800
|
|
|
cd5454 |
Subject: [PATCH] Filesystem: Add support for Amazon EFS mount helper
|
|
|
cd5454 |
|
|
|
cd5454 |
mount.efs, the mount helper for Amazon Elastic File System (EFS)
|
|
|
cd5454 |
provided by amazon-efs-utils [1], is a wrapper for mount.nfs4. It offers
|
|
|
cd5454 |
a number of AWS-specific mount options and some security improvements
|
|
|
cd5454 |
like encryption of data in transit.
|
|
|
cd5454 |
|
|
|
cd5454 |
This commit adds support by treating an fstype=efs like fstype=nfs4 for
|
|
|
cd5454 |
the most part.
|
|
|
cd5454 |
|
|
|
cd5454 |
Resolves: RHBZ#2049319
|
|
|
cd5454 |
|
|
|
cd5454 |
[1] https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html
|
|
|
cd5454 |
|
|
|
cd5454 |
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
|
|
cd5454 |
---
|
|
|
cd5454 |
heartbeat/Filesystem | 14 ++++++++------
|
|
|
cd5454 |
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
|
cd5454 |
|
|
|
cd5454 |
diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
|
|
|
cd5454 |
index 4d84846c1..1a90d6a42 100755
|
|
|
cd5454 |
--- a/heartbeat/Filesystem
|
|
|
cd5454 |
+++ b/heartbeat/Filesystem
|
|
|
cd5454 |
@@ -341,7 +341,7 @@ determine_blockdevice() {
|
|
|
cd5454 |
# Get the current real device name, if possible.
|
|
|
cd5454 |
# (specified devname could be -L or -U...)
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
- nfs4|nfs|smbfs|cifs|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|none|lustre)
|
|
|
cd5454 |
+ nfs4|nfs|efs|smbfs|cifs|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|none|lustre)
|
|
|
cd5454 |
: ;;
|
|
|
cd5454 |
*)
|
|
|
cd5454 |
match_string="${TAB}${CANONICALIZED_MOUNTPOINT}${TAB}"
|
|
|
cd5454 |
@@ -423,7 +423,7 @@ is_fsck_needed() {
|
|
|
cd5454 |
no) false;;
|
|
|
cd5454 |
""|auto)
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
- ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
|
|
|
cd5454 |
+ ext4|ext4dev|ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs4|nfs|efs|cifs|smbfs|ocfs2|gfs2|none|lustre|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs)
|
|
|
cd5454 |
false;;
|
|
|
cd5454 |
*)
|
|
|
cd5454 |
true;;
|
|
|
cd5454 |
@@ -450,9 +450,11 @@ fstype_supported()
|
|
|
cd5454 |
return $OCF_SUCCESS
|
|
|
cd5454 |
fi
|
|
|
cd5454 |
|
|
|
cd5454 |
- # support fuse-filesystems (e.g. GlusterFS)
|
|
|
cd5454 |
+ # support fuse-filesystems (e.g. GlusterFS) and Amazon Elastic File
|
|
|
cd5454 |
+ # System (EFS)
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
fuse.*|glusterfs|rozofs) support="fuse";;
|
|
|
cd5454 |
+ efs) support="nfs4";;
|
|
|
cd5454 |
esac
|
|
|
cd5454 |
|
|
|
cd5454 |
if [ "$support" != "$FSTYPE" ]; then
|
|
|
cd5454 |
@@ -701,7 +703,7 @@ Filesystem_stop()
|
|
|
cd5454 |
|
|
|
cd5454 |
# For networked filesystems, there's merit in trying -f:
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
- nfs4|nfs|cifs|smbfs) umount_force="-f" ;;
|
|
|
cd5454 |
+ nfs4|nfs|efs|cifs|smbfs) umount_force="-f" ;;
|
|
|
cd5454 |
esac
|
|
|
cd5454 |
|
|
|
cd5454 |
# Umount all sub-filesystems mounted under $MOUNTPOINT/ too.
|
|
|
cd5454 |
@@ -892,7 +894,7 @@ set_blockdevice_var() {
|
|
|
cd5454 |
|
|
|
cd5454 |
# these are definitely not block devices
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
- nfs4|nfs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|lustre) return;;
|
|
|
cd5454 |
+ nfs4|nfs|efs|smbfs|cifs|none|glusterfs|ceph|tmpfs|overlay|overlayfs|rozofs|zfs|cvfs|lustre) return;;
|
|
|
cd5454 |
esac
|
|
|
cd5454 |
|
|
|
cd5454 |
if $(is_option "loop"); then
|
|
|
cd5454 |
@@ -1013,7 +1015,7 @@ is_option "ro" &&
|
|
|
cd5454 |
CLUSTERSAFE=2
|
|
|
cd5454 |
|
|
|
cd5454 |
case "$FSTYPE" in
|
|
|
cd5454 |
-nfs4|nfs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs|cvfs|lustre)
|
|
|
cd5454 |
+nfs4|nfs|efs|smbfs|cifs|none|gfs2|glusterfs|ceph|ocfs2|overlay|overlayfs|tmpfs|cvfs|lustre)
|
|
|
cd5454 |
CLUSTERSAFE=1 # this is kind of safe too
|
|
|
cd5454 |
;;
|
|
|
cd5454 |
# add here CLUSTERSAFE=0 for all filesystems which are not
|