Whamcloud - gitweb
LU-9899 tests: mount client on MGS for tests with pools
[fs/lustre-release.git] / lustre / tests / test-framework.sh
index e8ecdfa..be82fec 100755 (executable)
@@ -1864,6 +1864,19 @@ zconf_umount() {
     fi
 }
 
+# Mount the file system on the MGS
+mount_mgs_client() {
+       do_facet mgs "mkdir -p $MOUNT"
+       zconf_mount $mgs_HOST $MOUNT $MOUNT_OPTS ||
+               error "unable to mount $MOUNT on MGS"
+}
+
+# Unmount the file system on the MGS
+umount_mgs_client() {
+       zconf_umount $mgs_HOST $MOUNT
+       do_facet mgs "rm -rf $MOUNT"
+}
+
 # nodes is comma list
 sanity_mount_check_nodes () {
     local nodes=$1
@@ -2501,7 +2514,7 @@ wait_update_facet() {
 
 sync_all_data() {
        do_nodes $(comma_list $(mdts_nodes)) \
-           "lctl set_param -n osd*.*MDT*.force_sync=1"
+           "lctl set_param -n os[cd]*.*MDT*.force_sync=1"
        do_nodes $(comma_list $(osts_nodes)) \
            "lctl set_param -n osd*.*OS*.force_sync=1" 2>&1 |
                grep -v 'Found no match'
@@ -2542,7 +2555,7 @@ wait_delete_completed_mds() {
        mds2sync=$(comma_list $mds2sync)
 
        # sync MDS transactions
-       do_nodes $mds2sync "$LCTL set_param -n osd*.*MD*.force_sync 1"
+       do_nodes $mds2sync "$LCTL set_param -n os[cd]*.*MD*.force_sync 1"
 
        # wait till all changes are sent and commmitted by OSTs
        # for ldiskfs space is released upon execution, but DMU
@@ -3969,7 +3982,7 @@ format_ost() {
 }
 
 formatall() {
-       stopall
+       stopall -f
        # Set hostid for ZFS/SPL zpool import protection
        # (Assumes MDS version is also OSS version)
        if [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.8.54) ];