lss_err "(5) Fail to mount lss_1a_0"
echo "Check whether mounted (2)"
- local mcount=$(lsnapshot_list -n lss_1a_0 -d | grep "not mount" | wc -l)
+ local mcount=$(lsnapshot_list -n lss_1a_0 -d | grep -c "not mount")
[[ $mcount -ne 0 ]] && {
if combined_mgs_mds ; then
lsnapshot_list -n lss_1a_0 -d
lss_err "(5) Expect 'mounted', got 'not mount' for lss_1b_0"
}
+ echo "Remount lss_1b_0"
+ lsnapshot_mount -n lss_1b_0 &&
+ lss_err "(6) Mount already mounted snapshot should fail"
+
+ echo "Check whether mounted (3)"
+ lsnapshot_list -n lss_1b_0 -d | grep "not mount" && {
+ lsnapshot_list -n lss_1b_0 -d
+ lss_err "(7) Expect 'mounted', got 'not mount' for lss_1b_0"
+ }
+
echo "umount lss_1b_0"
lsnapshot_umount -n lss_1b_0 ||
- lss_err "(6) Fail to umount lss_1b_0"
+ lss_err "(8) Fail to umount lss_1b_0"
- echo "Check whether mounted (3)"
+ echo "Check whether mounted (4)"
lsnapshot_list -n lss_1b_0 -d | grep "mounted" && {
lsnapshot_list -n lss_1b_0 -d
- lss_err "(7) Expect 'not mount', got 'mounted' for lss_1b_0"
+ lss_err "(9) Expect 'not mount', got 'mounted' for lss_1b_0"
}
- setupall || lss_err "(8) Fail to setupall"
+ setupall || lss_err "(10) Fail to setupall"
}
run_test 1b "mount snapshot without original filesystem mounted"
if (si->si_mgs == si->si_mdt0)
mdt0_mounted = true;
+ } else {
+ si->si_mgs->st_ignored = 1;
}
/* 2. Mount MDT0 if it is not combined with the MGS. */
si->si_mdt0->st_ignored = 0;
si->si_mdt0->st_pid = 0;
rc = snapshot_mount_target(si, si->si_mdt0, ",nomgs");
+ if (rc == -ESRCH) {
+ si->si_mdt0->st_ignored = 1;
+ rc = 0;
+ }
if (rc)
goto cleanup;
}