- for i in $(seq 1 4);
- do
- dir=${POOL_ROOT}/dir${i}
- local pool
- local pool1
- local count
- local count1
- local index
- local size
- local size1
-
- createmany -o $dir/${tfile} $numfiles || \
- error "createmany $dir/${tfile} failed!"
- res=$($GETSTRIPE -v $dir | grep "^stripe_count:")
- if [ $? -ne 0 ]; then
- res=$($GETSTRIPE -v $dir | grep "^(Default) ")
- pool=$(cut -f 9 -d ' ' <<< $res)
- index=$(cut -f 7 -d ' ' <<< $res)
- size=$(cut -f 5 -d ' ' <<< $res)
- count=$(cut -f 3 -d ' ' <<< $res)
- else
- pool=$(cut -f 8 -d ' ' <<< $res)
- index=$(cut -f 6 -d ' ' <<< $res)
- size=$(cut -f 4 -d ' ' <<< $res)
- count=$(cut -f 2 -d ' ' <<< $res)
- fi
-
- for file in $dir/*; do
- if [ "$pool" != "" ]; then
- check_file_in_pool $file $pool
- fi
- pool1=$($GETSTRIPE -v $file | grep "^pool:" |\
- tr -d '[:blank:]' | cut -f 2 -d ':')
- count1=$($GETSTRIPE -v $file | grep "^lmm_stripe_count:" |\
- tr -d '[:blank:]' | cut -f 2 -d ':')
- size1=$($GETSTRIPE -v $file | grep "^lmm_stripe_size:" |\
- tr -d '[:blank:]' | cut -f 2 -d ':')
- [[ "$pool" != "$pool1" ]] && \
- error "Pool name ($pool) not inherited in $file($pool1)"
- [[ "$count" != "$count1" ]] && \
- error "Stripe count ($count) not inherited in $file ($count1)"
- [[ "$size" != "$size1" ]] && [[ "$size" != "0" ]] && \
- error "Stripe size ($size) not inherited in $file ($size1)"
- done
+ for i in 1 2 3 4; do
+ dir=${POOL_ROOT}/dir${i}
+ local pool
+ local pool1
+ local count
+ local count1
+ local index
+ local size
+ local size1
+
+ createmany -o $dir/${tfile} $numfiles ||
+ error "createmany $dir/${tfile} failed!"
+ res=$($GETSTRIPE -v $dir | grep "^stripe_count:")
+ if [ $? -ne 0 ]; then
+ res=$($GETSTRIPE -v $dir | grep "^(Default) ")
+ pool=$(cut -f 9 -d ' ' <<< $res)
+ index=$(cut -f 7 -d ' ' <<< $res)
+ size=$(cut -f 5 -d ' ' <<< $res)
+ count=$(cut -f 3 -d ' ' <<< $res)
+ else
+ pool=$(cut -f 8 -d ' ' <<< $res)
+ index=$(cut -f 6 -d ' ' <<< $res)
+ size=$(cut -f 4 -d ' ' <<< $res)
+ count=$(cut -f 2 -d ' ' <<< $res)
+ fi
+
+ for file in $dir/*; do
+ if [ "$pool" != "" ]; then
+ check_file_in_pool $file $pool
+ fi
+ pool1=$(file_pool $file)
+ count1=$($GETSTRIPE -v $file | grep "^lmm_stripe_count:" |
+ tr -d '[:blank:]' | cut -f 2 -d ':')
+ size1=$($GETSTRIPE -v $file | grep "^lmm_stripe_size:" |
+ tr -d '[:blank:]' | cut -f 2 -d ':')
+ [[ "$pool" != "$pool1" ]] &&
+ error "Pool name ($pool) not inherited in $file($pool1)"
+ [[ "$count" != "$count1" ]] &&
+ error "Stripe count ($count) not inherited in $file ($count1)"
+ [[ "$size" != "$size1" ]] && [[ "$size" != "0" ]] &&
+ error "Stripe size ($size) not inherited in $file ($size1)"
+ done