Add debugging to conf-sanity.sh test_78 to see why this test is
regularly reporting ENOSPC creating 100x 1MB test files, when
there should be many GB of space available during the test.
Don't fail the test if the OST runs out of space, or if the MDS
refuses to create more files when OST has no available blocks,
since the main goal of this test is to verify ldiskfs resizing.
Test-Parameters: trivial testlist=conf-sanity,conf-sanity,conf-sanity
Test-Parameters: testlist=conf-sanity,conf-sanity,conf-sanity,conf-sanity
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id5a7049aa434c794a5a8f8aa5398bf7ca9bcab07
Reviewed-on: http://review.whamcloud.com/20166
Tested-by: Jenkins
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
skip "only applicable to ldiskfs-based MDTs and OSTs" && return
# reformat the Lustre filesystem with a smaller size
skip "only applicable to ldiskfs-based MDTs and OSTs" && return
# reformat the Lustre filesystem with a smaller size
+ local saved_MDSCOUNT=$MDSCOUNT
local saved_MDSSIZE=$MDSSIZE
local saved_MDSSIZE=$MDSSIZE
+ local saved_OSTCOUNT=$OSTCOUNT
local saved_OSTSIZE=$OSTSIZE
local saved_OSTSIZE=$OSTSIZE
+ MDSCOUNT=1
+ OSTCOUNT=1
MDSSIZE=$((MDSSIZE - 20000))
OSTSIZE=$((OSTSIZE - 20000))
reformat || error "(1) reformat Lustre filesystem failed"
MDSSIZE=$((MDSSIZE - 20000))
OSTSIZE=$((OSTSIZE - 20000))
reformat || error "(1) reformat Lustre filesystem failed"
local i
local file
local num_files=100
local i
local file
local num_files=100
mkdir $MOUNT/$tdir || error "(3) mkdir $MOUNT/$tdir failed"
mkdir $MOUNT/$tdir || error "(3) mkdir $MOUNT/$tdir failed"
for i in $(seq $num_files); do
file=$MOUNT/$tdir/$tfile-$i
for i in $(seq $num_files); do
file=$MOUNT/$tdir/$tfile-$i
- dd if=/dev/urandom of=$file count=1 bs=1M ||
+ dd if=/dev/urandom of=$file count=1 bs=1M || {
+ $LCTL get_param osc.*.cur*grant*
+ $LFS df; $LFS df -i;
+ # stop creating files if there is no more space
+ [ -e $file ] || break
+
+ $LFS getstripe -v $file
+ local ost_idx=$(LFS getstripe -i $file)
+ do_facet ost$((ost_idx + 1)) \
+ $LCTL get_param obdfilter.*.*grant*
error "(4) create $file failed"
error "(4) create $file failed"
done
# unmount the Lustre filesystem
done
# unmount the Lustre filesystem
# unmount and reformat the Lustre filesystem
cleanup || error "(12) cleanup Lustre filesystem failed"
combined_mgs_mds || stop_mgs || error "(13) stop mgs failed"
# unmount and reformat the Lustre filesystem
cleanup || error "(12) cleanup Lustre filesystem failed"
combined_mgs_mds || stop_mgs || error "(13) stop mgs failed"
+
+ MDSCOUNT=$saved_MDSCOUNT
+ OSTCOUNT=$saved_OSTCOUNT
reformat || error "(14) reformat Lustre filesystem failed"
}
run_test 78 "run resize2fs on MDT and OST filesystems"
reformat || error "(14) reformat Lustre filesystem failed"
}
run_test 78 "run resize2fs on MDT and OST filesystems"