Adds _clone_mount_options() helper function to handle filesystem-specific requirements for mounting cloned devices. Abstract the need for -o nouuid on XFS. Signed-off-by: Anand Jain Reviewed-by: "Darrick J. Wong" --- common/rc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/rc b/common/rc index f2ab4bc491af..b9481ba8ab55 100644 --- a/common/rc +++ b/common/rc @@ -428,6 +428,19 @@ _scratch_mount_options() $SCRATCH_DEV $SCRATCH_MNT } +# Return filesystem-specific mount options required for mounting clone/snapshot +# devices. +_clone_mount_options() +{ + case "$FSTYP" in + xfs) + # Allow mounting a duplicate filesystem on the same host + echo "-o nouuid" + ;; + *) + esac +} + _supports_filetype() { local dir=$1 -- 2.43.0