From 5a7efc57251651f233fc12d8edc2dd2f3eb33c85 Mon Sep 17 00:00:00 2001 From: Shuichi Ihara Date: Mon, 14 Feb 2022 12:37:48 +0900 Subject: [PATCH] EX-4811 lipe: Allows nfs/nfs4 targets for loris Loris only supprots local filesystems (e.g. ext4, xfs and brtfs) as backup target. embedded MDS (ESx00X) doesn't have enough space in the local disk. it needs to eliminate filesystem type and allow NFS/NFS4 for loris's backup targets. Test-Parameters: trivial Signed-off-by: Shuichi Ihara Change-Id: I010793402065cd553c18a7f408240841e4a22565 Reviewed-on: https://review.whamcloud.com/46515 Reviewed-by: Li Xi Tested-by: jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lipe/pyloris/lbackup.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lipe/pyloris/lbackup.py b/lipe/pyloris/lbackup.py index edc80db..7597330 100755 --- a/lipe/pyloris/lbackup.py +++ b/lipe/pyloris/lbackup.py @@ -80,12 +80,6 @@ class BackupService(object): (path, host.sh_hostname)) log.cl_error(reason) raise Exception(reason) - if fstype != "ext4" and fstype != "btrfs" and fstype != "xfs": - reason = ("path [%s] on host [%s] has an unsuported file " - "system [%s]" % - (path, host.sh_hostname, fstype)) - log.cl_error(reason) - raise Exception(reason) self.bs_fstype = fstype snapshot_pattern = (r"^(?P\d+)_(?P\S+)$") self.bs_snapshot_regular = re.compile(snapshot_pattern) @@ -203,7 +197,8 @@ class BackupService(object): retval.cr_stdout, retval.cr_stderr) return -1 - elif self.bs_support_immutable: + # disable immutable option for NFS or NFS4 backup target + elif self.bs_support_immutable and self.bs_fstype != "nfs" and self.bs_fstype != "nfs4": command = ("chattr -R +i %s" % (snapshot_path)) retval = self.bs_host.sh_run(log, command) @@ -648,7 +643,8 @@ class BackupService(object): retval.cr_stderr) return -1 else: - if self.bs_support_immutable: + # disable immutable option for NFS or NFS4 backup target + if self.bs_support_immutable and self.bs_fstype != "nfs" and self.bs_fstype != "nfs4": command = ("chattr -R -i %s" % (path)) retval = self.bs_host.sh_run(log, command) if retval.cr_exit_status: -- 1.8.3.1