Whamcloud - gitweb
LU-2523 tests: disable racer setstripe until fixed
[fs/lustre-release.git] / lustre / tests / racer / file_create.sh
1 #!/bin/bash
2
3 DIR=$1
4 MAX=$2
5 MAX_MB=256
6
7 # disable until LU-2523 and LU-2789 are fixed
8 [ -z "$RACER_SETSTRIPE" ] && RACER_SETSTRIPE=false
9 OSTCOUNT=${OSTCOUNT:-$(lfs df $DIR 2> /dev/null | grep -c OST)}
10
11 while /bin/true ; do 
12         file=$((RANDOM % MAX))
13         SIZE=$((RANDOM * MAX_MB / 32))
14         echo "file_create: FILE=$DIR/$file SIZE=$SIZE"
15         [ $OSTCOUNT -gt 0 ] && $RACER_SETSTRIPE &&
16                 lfs setstripe -c $((RANDOM % OSTCOUNT)) $DIR/$file 2> /dev/null
17         dd if=/dev/zero of=$DIR/$file bs=1k count=$SIZE 2> /dev/null
18 done
19