Whamcloud - gitweb
b=19780
authormanoj <manoj>
Wed, 16 Sep 2009 22:31:25 +0000 (22:31 +0000)
committermanoj <manoj>
Wed, 16 Sep 2009 22:31:25 +0000 (22:31 +0000)
r=grev
r=alexey.lyashkov

New test that restarts the mds with an active pool

lustre/tests/ost-pools.sh

index 2e07618..0f2cb62 100644 (file)
@@ -1319,6 +1319,32 @@ test_24() {
 }
 run_test 24 "Independence of pool from other setstripe parameters"
 
+test_25() {
+    local dev=$(mdsdevname ${SINGLEMDS//mds/})
+    local POOL_ROOT=${POOL_ROOT:-$DIR/$tdir}
+
+    mkdir -p $POOL_ROOT
+
+    for i in $(seq 10); do
+        create_pool_nofail pool$i
+        stop $SINGLEMDS -f  || return 1
+        sleep 10
+        start $SINGLEMDS ${dev} $MDS_MOUNT_OPTS  || \
+            error "Failed to start $SINGLEMDS after stopping" 
+
+        # Veriy that the pool got created and is usable
+        echo "Creating a file in pool$i"
+        create_file $POOL_ROOT/file$i pool$i
+        check_file_in_pool $POOL_ROOT/file$i pool$i
+    done
+
+    rm -rf $POOL_ROOT
+    for i in $(seq 10); do
+        destroy_pool pool$i
+    done
+}
+run_test 25 "Create new pool and restart MDS ======================="
+
 log "cleanup: ======================================================"
 cd $ORIG_PWD
 cleanup_tests