Whamcloud - gitweb
Branch b1_6
authoryujian <yujian>
Mon, 10 Mar 2008 02:30:12 +0000 (02:30 +0000)
committeryujian <yujian>
Mon, 10 Mar 2008 02:30:12 +0000 (02:30 +0000)
b=14850
i=eric.mei
i=adilger

set timeout value before mounting MDT/OST

lustre/tests/test-framework.sh

index 8c77f56..a61f157 100644 (file)
@@ -757,15 +757,27 @@ remount_client()
        zconf_mount `hostname` $1 || error "mount failed"
 }
 
+set_obd_timeout() {
+    local facet=$1
+    local timeout=$2
+
+    do_facet $facet lsmod | grep -q obdclass || \
+        do_facet $facet "modprobe obdclass"
+
+    do_facet $facet "sysctl -w lustre.timeout=$timeout"
+}
+
 setupall() {
     load_modules
     if [ -z "$CLIENTONLY" ]; then
         echo Setup mdt, osts
         echo $REFORMAT | grep -q "reformat" \
            || do_facet mds "$TUNEFS --writeconf $MDSDEV"
+        set_obd_timeout mds $TIMEOUT
         start mds $MDSDEV $MDS_MOUNT_OPTS
         for num in `seq $OSTCOUNT`; do
             DEVNAME=`ostdevname $num`
+            set_obd_timeout ost$num $TIMEOUT
             start ost$num $DEVNAME $OST_MOUNT_OPTS
         done
     fi