3 # check 2^31 volume switching for pmlogrewrite
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
6 # Copyright (c) 2012 Red Hat.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
19 .
/tmparch
/mkbig1
> $seq.full
2>&1
20 [ $?
-eq 0 ] || _notrun
`cat $seq.full`
22 # 10GB should keep us out of trouble
23 free
=`_check_freespace 10240`
24 [ -z "$free" ] || _notrun
$free
26 status
=0 # success is the default!
27 $sudo rm -rf $tmp.
* $seq.full
28 trap "rm -f $tmp.* tmparch/big2.*; exit \$status" 0 1 2 3 15
33 -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
38 # expect 3 volumes, and all < 2^31 bytes in size
42 nvol
=`ls $1.? | wc -l | sed -e 's/ //g'`
46 echo "Error: expecting 3 volumes, found $nvol"
56 echo "Error: cannot extract size for volume $vol"
58 elif [ "$size" -ge $limit ]
61 echo "Error: size ($size) exceeds limit ($limit)"
73 echo "metric sample.hordes.one { type -> 64 }" >$tmp.config
74 echo "metric sample.hordes.two { type -> 64 }" >>$tmp.config
76 # real QA test starts here
77 echo "rewrite and copy" |
tee -a $seq.full
79 ls -l tmparch
/big1
* >>$seq.full
2>&1
80 pminfo
-d -a tmparch
/big1
>>$seq.full
81 pmlogrewrite
-w -c $tmp.config tmparch
/big1 tmparch
/big2
2>&1 | _filter
82 ls -l tmparch
/big2
* >>$seq.full
2>&1
83 pminfo
-d -a tmparch
/big2
>>$seq.full
86 echo |
tee -a $seq.full
87 echo "rewrite in place" |
tee -a $seq.full
89 for file in tmparch
/big1.
*
91 cp $file `echo $file | sed -e 's/big1/big2/'`
93 ls -l tmparch
/big2
* >>$seq.full
2>&1
94 pminfo
-d -a tmparch
/big2
>>$seq.full
95 pmlogrewrite
-iw -c $tmp.config tmparch
/big2
2>&1 | _filter
96 ls -l tmparch
/big2
* >>$seq.full
2>&1
97 pminfo
-d -a tmparch
/big2
>>$seq.full