Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.10.0
-
None
Description
Our fsname contains a dash, which we found breaks snapshots. The following change corrects the problem.
diff --git a/lustre/utils/lsnapshot.c b/lustre/utils/lsnapshot.c
index 4fef5c0..f08cc9e 100644
--- a/lustre/utils/lsnapshot.c
+++ b/lustre/utils/lsnapshot.c
@@ -253,7 +253,8 @@ static int snapshot_load_conf_ldev(struct snapshot_instance
/* Format of label:
* fsname-<role><index> or <role><index> */
- ptr = strchr(label, '-');
+ ptr = strrchr(label, '-'); /* use strrchr to handle the case when fsname
+ contains a '-' */
if (ptr) {
if (strncmp(si->si_fsname, label, ptr - label) != 0) {
/* This line is NOT for current filesystem .*/