diff options
-rw-r--r-- | mdadm.8 | 9 | ||||
-rw-r--r-- | super0.c | 4 | ||||
-rw-r--r-- | super1.c | 5 | ||||
-rw-r--r-- | test | 2 | ||||
-rw-r--r-- | tests/00linear | 12 | ||||
-rw-r--r-- | tests/00multipath | 8 | ||||
-rw-r--r-- | tests/00raid0 | 12 | ||||
-rw-r--r-- | tests/00raid1 | 8 | ||||
-rw-r--r-- | tests/00raid10 | 2 | ||||
-rw-r--r-- | tests/00raid4 | 2 | ||||
-rw-r--r-- | tests/00raid5 | 4 | ||||
-rw-r--r-- | tests/00raid6 | 2 | ||||
-rw-r--r-- | tests/02lineargrow | 4 | ||||
-rw-r--r-- | tests/02r1grow | 2 | ||||
-rw-r--r-- | tests/02r5grow | 2 | ||||
-rw-r--r-- | tests/02r6grow | 2 | ||||
-rw-r--r-- | tests/03r0assem | 35 | ||||
-rw-r--r-- | tests/03r5assem | 2 | ||||
-rw-r--r-- | tests/04r0update | 2 | ||||
-rw-r--r-- | tests/05r1-bitmapfile | 6 | ||||
-rw-r--r-- | tests/05r1-grow-external | 4 | ||||
-rw-r--r-- | tests/05r1-grow-internal | 4 | ||||
-rw-r--r-- | tests/05r1-internalbitmap | 2 | ||||
-rw-r--r-- | tests/05r1-n3-bitmapfile | 2 | ||||
-rw-r--r-- | tests/05r1-re-add | 8 | ||||
-rw-r--r-- | tests/05r5-bitmapfile | 6 | ||||
-rw-r--r-- | tests/05r5-internalbitmap | 6 | ||||
-rw-r--r-- | tests/05r6-bitmapfile | 6 | ||||
-rw-r--r-- | tests/06r5swap | 2 | ||||
-rw-r--r-- | tests/06wrmostly | 4 | ||||
-rw-r--r-- | tests/07autoassemble | 10 | ||||
-rw-r--r-- | tests/07autodetect | 6 | ||||
-rw-r--r-- | tests/07changelevels | 14 | ||||
-rw-r--r-- | tests/07layouts | 2 | ||||
-rw-r--r-- | tests/07testreshape5 | 2 |
35 files changed, 106 insertions, 97 deletions
@@ -311,7 +311,7 @@ says to get a list of array devices from .TP .BR \-e ", " \-\-metadata= Declare the style of RAID metadata (superblock) to be used. The -default is 0.90 for +default is 1.1 for .BR \-\-create , and to guess for other operations. The default can be overridden by setting the @@ -323,15 +323,16 @@ keyword in Options are: .RS -.IP "0, 0.90, default" +.IP "0, 0.90" Use the original 0.90 format superblock. This format limits arrays to 28 component devices and limits component devices of levels 1 and greater to 2 terabytes. -.IP "1, 1.0, 1.1, 1.2" +.IP "1, 1.0, 1.1, 1.2 default" Use the new version-1 format superblock. This has few restrictions. The different sub-versions store the superblock at different locations on the device, either at the end (for 1.0), at the start (for 1.1) or -4K from the start (for 1.2). +4K from the start (for 1.2). '1' is equivalent to '1.0', 'default' is +equivalent to '1.1'. .IP ddf Use the "Industry Standard" DDF (Disk Data Format) format defined by SNIA. @@ -921,9 +921,7 @@ static struct supertype *match_metadata_desc0(char *arg) while (arg[0] == '0' && arg[1] == '0') arg++; if (strcmp(arg, "0") == 0 || - strcmp(arg, "0.90") == 0 || - strcmp(arg, "default") == 0 || - strcmp(arg, "") == 0 /* no metadata */ + strcmp(arg, "0.90") == 0 ) return st; @@ -1351,7 +1351,10 @@ static struct supertype *match_metadata_desc1(char *arg) return st; } if (strcmp(arg, "1.1") == 0 || - strcmp(arg, "1.01") == 0) { + strcmp(arg, "1.01") == 0 || + strcmp(arg, "default") == 0 || + strcmp(arg, "") == 0 /* no metadata */ + ) { st->minor_version = 1; return st; } @@ -34,6 +34,8 @@ mdsize0=19904 mdsize00=19840 # super1.0 round down to multiple of 2, subtract 8 mdsize1=19992 +# super1.1 for linear: round to multiple of 2, subtract 4 +mdsize1_l=19996 # subtract another 4 for bitmaps mdsize1b=19988 mdsize11=19992 diff --git a/tests/00linear b/tests/00linear index d0791c1..1aea0a2 100644 --- a/tests/00linear +++ b/tests/00linear @@ -3,11 +3,17 @@ mdadm -CR $md0 -l linear -n3 $dev0 $dev1 $dev2 check linear -testdev $md0 3 $mdsize0 1 +testdev $md0 3 $mdsize1_l 1 mdadm -S $md0 -# now with version-1 superblock -mdadm -CR $md0 -e1 --level=linear -n4 $dev0 $dev1 $dev2 $dev3 +# now with version-0.90 superblock +mdadm -CR $md0 -e0.90 --level=linear -n4 $dev0 $dev1 $dev2 $dev3 +check linear +testdev $md0 4 $mdsize0 1 +mdadm -S $md0 + +# now with version-1.0 superblock +mdadm -CR $md0 -e1.0 --level=linear -n4 $dev0 $dev1 $dev2 $dev3 check linear testdev $md0 4 $mdsize1 1 mdadm -S $md0 diff --git a/tests/00multipath b/tests/00multipath index efad690..cc52fb3 100644 --- a/tests/00multipath +++ b/tests/00multipath @@ -4,21 +4,21 @@ mdadm -CR $md1 -l multipath -n2 $path0 $path1 -testdev $md1 1 $mdsize0 1 +testdev $md1 1 $mdsize1 1 mdadm $md1 -f $path0 rotest $md1 -testdev $md1 1 $mdsize0 1 +testdev $md1 1 $mdsize1 1 mdadm $md1 -r $path0 mdadm $md1 -a $path0 rotest $md1 -testdev $md1 1 $mdsize0 1 +testdev $md1 1 $mdsize1 1 mdadm $md1 -f $path1 mdadm $md1 -r $path1 rotest $md1 -testdev $md1 1 $mdsize0 1 +testdev $md1 1 $mdsize1 1 mdadm -S $md1 diff --git a/tests/00raid0 b/tests/00raid0 index 8c3dfc3..1614a63 100644 --- a/tests/00raid0 +++ b/tests/00raid0 @@ -3,13 +3,13 @@ mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2 check raid0 -testdev $md0 3 $mdsize0 512 +testdev $md0 3 $mdsize1_l 512 mdadm -S $md0 -# now with version-1 superblock -mdadm -CR $md0 -e1 -l0 -n4 $dev0 $dev1 $dev2 $dev3 +# now with version-0.90 superblock +mdadm -CR $md0 -e0.90 -l0 -n4 $dev0 $dev1 $dev2 $dev3 check raid0 -testdev $md0 4 $mdsize1 512 +testdev $md0 4 $mdsize0 512 mdadm -S $md0 # now with no superblock @@ -22,13 +22,13 @@ mdadm -S $md0 # now same again with different chunk size for chunk in 4 32 256 do - mdadm -CR $md0 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2 + mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2 check raid0 testdev $md0 3 $mdsize0 $chunk mdadm -S $md0 # now with version-1 superblock - mdadm -CR $md0 -e1 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3 + mdadm -CR $md0 -e1.0 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3 check raid0 testdev $md0 4 $mdsize1 $chunk mdadm -S $md0 diff --git a/tests/00raid1 b/tests/00raid1 index 2ad82d0..45dc86a 100644 --- a/tests/00raid1 +++ b/tests/00raid1 @@ -6,14 +6,14 @@ mdadm -CR $md0 -l 1 -n2 $dev0 $dev1 check resync check raid1 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 mdadm -S $md0 -# now with version-1 superblock, spare -mdadm -CR $md0 -e1 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2 +# now with version-0.90 superblock, spare +mdadm -CR $md0 -e0.90 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2 check recovery check raid1 -testdev $md0 1 $mdsize1b 1 +testdev $md0 1 $mdsize0 1 mdadm -S $md0 # now with no superblock diff --git a/tests/00raid10 b/tests/00raid10 index 283bfcd..796b970 100644 --- a/tests/00raid10 +++ b/tests/00raid10 @@ -13,6 +13,6 @@ do esac mdadm --create --run --level=raid10 --layout $lo --raid-disks 6 -x 1 $md0 $devs check resync ; check raid10 - testdev $md0 $m $mdsize0 $[512*cm] + testdev $md0 $m $mdsize1 $[512*cm] mdadm -S $md0 done diff --git a/tests/00raid4 b/tests/00raid4 index fa6eab5..97d3e3f 100644 --- a/tests/00raid4 +++ b/tests/00raid4 @@ -3,7 +3,7 @@ mdadm -CfR $md0 -l 4 -n3 $dev0 $dev1 $dev2 check resync ; check raid[45] -testdev $md0 2 $mdsize0 512 +testdev $md0 2 $mdsize1 512 mdadm -S $md0 # now with version-1 superblock diff --git a/tests/00raid5 b/tests/00raid5 index 0caf935..a288c83 100644 --- a/tests/00raid5 +++ b/tests/00raid5 @@ -1,7 +1,7 @@ # create a simple raid5 set -mdadm -CfR $md0 -l 5 -n3 $dev0 $dev1 $dev2 +mdadm -CfR $md0 -e 0.90 -l 5 -n3 $dev0 $dev1 $dev2 check resync testdev $md0 2 $mdsize0 512 mdadm -S $md0 @@ -19,7 +19,7 @@ do mdadm -CfR $md0 -l 5 -p $lo -n3 $dev0 $dev1 $dev2 check resync ; check raid5 - testdev $md0 2 $mdsize0 512 + testdev $md0 2 $mdsize1 512 mdadm -S $md0 # now with version-1 superblock diff --git a/tests/00raid6 b/tests/00raid6 index 4b293e2..63d60f5 100644 --- a/tests/00raid6 +++ b/tests/00raid6 @@ -1,7 +1,7 @@ # create a simple raid6 set -mdadm -CfR $md0 -l 6 -n4 $dev0 $dev1 $dev2 $dev3 +mdadm -CfR $md0 -e0.90 -l 6 -n4 $dev0 $dev1 $dev2 $dev3 check resync ; check raid6 testdev $md0 2 $mdsize0 512 mdadm -S $md0 diff --git a/tests/02lineargrow b/tests/02lineargrow index 3f7c1a9..b093355 100644 --- a/tests/02lineargrow +++ b/tests/02lineargrow @@ -6,8 +6,8 @@ do case $e in 0.90 ) sz=$mdsize0 ;; 1 ) sz=$mdsize1 ;; - 1.1 ) sz=$mdsize11 ;; - 1.2 ) sz=$mdsize12 ;; + 1.1 ) sz=$mdsize1_l ;; + 1.2 ) sz=$mdsize11 ;; esac mdadm -CRf $md0 --level linear -e $e --raid-disks=1 $dev1 testdev $md0 1 $sz 1 diff --git a/tests/02r1grow b/tests/02r1grow index 916a31f..43f037b 100644 --- a/tests/02r1grow +++ b/tests/02r1grow @@ -2,7 +2,7 @@ # create a small raid1 array, make it larger. Then make it smaller -mdadm -CR $md0 --level raid1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 +mdadm -CR $md0 -e 0.90 --level raid1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 check wait check state UUU testdev $md0 1 $[size/2] 1 diff --git a/tests/02r5grow b/tests/02r5grow index 0b46f60..e526962 100644 --- a/tests/02r5grow +++ b/tests/02r5grow @@ -2,7 +2,7 @@ # create a small raid5 array, make it larger. Then make it smaller -mdadm -CR $md0 --level raid5 --chunk=32 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 +mdadm -CR $md0 -e0.90 --level raid5 --chunk=32 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 check wait check state UUU testdev $md0 2 $[size/2] 32 diff --git a/tests/02r6grow b/tests/02r6grow index 1a7042c..3261760 100644 --- a/tests/02r6grow +++ b/tests/02r6grow @@ -2,7 +2,7 @@ # create a small raid6 array, make it larger. Then make it smaller -mdadm -CR $md0 --level raid6 --chunk=32 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4 +mdadm -CR $md0 -e 0.90 --level raid6 --chunk=32 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4 check wait check state UUUU testdev $md0 2 $[size/2] 32 diff --git a/tests/03r0assem b/tests/03r0assem index 10e2a66..db6486e 100644 --- a/tests/03r0assem +++ b/tests/03r0assem @@ -6,7 +6,7 @@ mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2 check raid0 -tst="testdev $md2 3 $mdsize0 512" +tst="testdev $md2 3 $mdsize1 512" $tst uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` mdadm -S $md2 @@ -19,7 +19,7 @@ mdadm -A $md2 -u $uuid $devlist $tst mdadm -S $md2 -mdadm --assemble $md2 --super-minor=2 $devlist +mdadm --assemble $md2 --name=2 $devlist $tst mdadm -S $md2 @@ -35,7 +35,7 @@ mdadm -S $md2 { echo DEVICE $devlist - echo array $md2 super-minor=2 + echo array $md2 name=2 } > $conf mdadm -As -c $conf $md2 @@ -65,12 +65,12 @@ $tst mdadm -S $md2 -### Now for version 1... +### Now for version 0... mdadm --zero-superblock $dev0 $dev1 $dev2 -mdadm -CR $md2 -l0 --metadata=1.0 -n3 $dev0 $dev1 $dev2 +mdadm -CR $md2 -l0 --metadata=0.90 -n3 $dev0 $dev1 $dev2 check raid0 -tst="testdev $md2 3 $mdsize1 512" +tst="testdev $md2 3 $mdsize0 512" $tst uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` @@ -84,10 +84,9 @@ mdadm -A $md2 -u $uuid $devlist $tst mdadm -S $md2 -# version 1 has no super-minor -# mdadm --assemble $md2 --super-minor=2 $devlist # -# $tst -# mdadm -S $md2 +mdadm --assemble $md2 --super-minor=2 $devlist # +$tst +mdadm -S $md2 conf=$targetdir/mdadm.conf { @@ -99,14 +98,14 @@ mdadm -As -c $conf $md2 $tst mdadm -S $md2 -#{ -# echo DEVICE $devlist -# echo array $md2 super-minor=2 -#} > $conf -# -#mdadm -As -c $conf $md2 -#$tst -#mdadm -S $md2 +{ + echo DEVICE $devlist + echo array $md2 super-minor=2 +} > $conf + +mdadm -As -c $conf $md2 +$tst +mdadm -S $md2 { diff --git a/tests/03r5assem b/tests/03r5assem index 585170f..de0d56b 100644 --- a/tests/03r5assem +++ b/tests/03r5assem @@ -2,7 +2,7 @@ # create a raid5 array and assemble it in various ways, # including with missing devices. -mdadm -CR $md1 -l5 -n3 $dev0 $dev1 $dev2 +mdadm -CR -e 0.90 $md1 -l5 -n3 $dev0 $dev1 $dev2 tst="check raid5 ;testdev $md1 2 $mdsize0 512 ; mdadm -S $md1" uuid=`mdadm -Db $md1 | sed 's/.*UUID=//'` check wait diff --git a/tests/04r0update b/tests/04r0update index e13645b..0cd815a 100644 --- a/tests/04r0update +++ b/tests/04r0update @@ -1,6 +1,6 @@ # create a raid0, re-assemble with a different super-minor -mdadm -CR $md0 -l0 -n3 $dev0 $dev1 $dev2 +mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2 testdev $md0 3 $mdsize0 512 minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` mdadm -S /dev/md0 diff --git a/tests/05r1-bitmapfile b/tests/05r1-bitmapfile index 59564cb..380b229 100644 --- a/tests/05r1-bitmapfile +++ b/tests/05r1-bitmapfile @@ -6,11 +6,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2 check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-grow-external b/tests/05r1-grow-external index aa49109..c110093 100644 --- a/tests/05r1-grow-external +++ b/tests/05r1-grow-external @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 bmf=$targetdir/bm rm -f $bmf @@ -14,7 +14,7 @@ dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-grow-internal b/tests/05r1-grow-internal index 1da28a9..6389562 100644 --- a/tests/05r1-grow-internal +++ b/tests/05r1-grow-internal @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 #mdadm -E $dev1 mdadm --grow $md0 --bitmap=internal --delay=1 || { mdadm -X $dev2 ; exit 1; } @@ -12,7 +12,7 @@ dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-internalbitmap b/tests/05r1-internalbitmap index 30114b0..0af4a7a 100644 --- a/tests/05r1-internalbitmap +++ b/tests/05r1-internalbitmap @@ -2,7 +2,7 @@ # # create a raid1 with an internal bitmap # -mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap internal $dev1 $dev2 +mdadm --create -e0.90 --run $md0 --level=1 -n2 --delay=1 --bitmap internal $dev1 $dev2 check wait testdev $md0 1 $mdsize0 1 mdadm -S $md0 diff --git a/tests/05r1-n3-bitmapfile b/tests/05r1-n3-bitmapfile index 59664fb..4b4f0f1 100644 --- a/tests/05r1-n3-bitmapfile +++ b/tests/05r1-n3-bitmapfile @@ -6,7 +6,7 @@ # bmf=$targetdir/bitmap rm -f $bmf -mdadm --create --run $md0 --level=1 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3 +mdadm --create -e0.90 --run $md0 --level=1 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3 check wait testdev $md0 1 $mdsize0 1 mdadm -S $md0 diff --git a/tests/05r1-re-add b/tests/05r1-re-add index b2dd82e..97db6c5 100644 --- a/tests/05r1-re-add +++ b/tests/05r1-re-add @@ -8,7 +8,7 @@ mdadm -CR $md0 -l1 -n2 -binternal -d1 $dev1 $dev2 check resync check wait -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 sleep 4 mdadm $md0 -f $dev2 @@ -21,10 +21,10 @@ check nosync mdadm $md0 -f $dev2 sleep 1 mdadm $md0 -r $dev2 -testdev $md0 1 $mdsize0 1 +testdev $md0 1 $mdsize1 1 mdadm $md0 -a $dev2 check wait -cmp --bytes=$[$mdsize0*1024] $dev1 $dev2 +cmp --ignore-initial=$[16*512] --bytes=$[$mdsize0*1024] $dev1 $dev2 mdadm $md0 -f $dev2; sleep 1 mdadm $md0 -r $dev2 @@ -32,5 +32,5 @@ if dd if=/dev/zero of=$md0 ; then : ; fi mdadm $md0 -a $dev2 check recovery check wait -cmp --bytes=$[$mdsize0*1024] $dev1 $dev2 +cmp --ignore-initial=$[16*512] --bytes=$[$mdsize0*1024] $dev1 $dev2 mdadm -S $md0 diff --git a/tests/05r5-bitmapfile b/tests/05r5-bitmapfile index 25c1228..c753758 100644 --- a/tests/05r5-bitmapfile +++ b/tests/05r5-bitmapfile @@ -6,11 +6,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create --run $md0 --level=5 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3 check wait -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 $dev3 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r5-internalbitmap b/tests/05r5-internalbitmap index d79db90..50dd36e 100644 --- a/tests/05r5-internalbitmap +++ b/tests/05r5-internalbitmap @@ -4,11 +4,11 @@ # mdadm --create --run $md0 --level=5 -n3 --delay=1 --bitmap internal $dev1 $dev2 $dev3 check wait -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 mdadm -S $md0 mdadm --assemble $md0 $dev1 $dev2 $dev3 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -18,7 +18,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 sleep 4 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r6-bitmapfile b/tests/05r6-bitmapfile index 865cedb..28c590e 100644 --- a/tests/05r6-bitmapfile +++ b/tests/05r6-bitmapfile @@ -6,11 +6,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create --run $md0 --level=6 -n4 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3 $dev4 check wait -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 $dev3 $dev4 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev3 -testdev $md0 2 $mdsize0 1 +testdev $md0 2 $mdsize1 512 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/06r5swap b/tests/06r5swap index 6a722e8..5373a60 100644 --- a/tests/06r5swap +++ b/tests/06r5swap @@ -1,7 +1,7 @@ # make a raid5 array, byte swap the superblocks, then assemble... -mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3 +mdadm -CR $md0 -e 0.90 -l5 -n4 $dev0 $dev1 $dev2 $dev3 sleep 4 mdadm -S $md0 diff --git a/tests/06wrmostly b/tests/06wrmostly index 34be60d..a4d730e 100644 --- a/tests/06wrmostly +++ b/tests/06wrmostly @@ -2,13 +2,13 @@ # create a raid1 array with a wrmostly device mdadm -CR $md0 -l1 -n3 $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize0 64 +testdev $md0 1 $mdsize1 1 # unfortunately, we cannot measure if any read requests are going to $dev2 mdadm -S $md0 mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize0 64 +testdev $md0 1 $mdsize1 1 mdadm -S $md0 diff --git a/tests/07autoassemble b/tests/07autoassemble index be3d993..49b9985 100644 --- a/tests/07autoassemble +++ b/tests/07autoassemble @@ -8,9 +8,9 @@ mdadm -CR $md0 -l0 -n2 $md1 $md2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize0 64 -testdev $md2 1 $mdsize0 64 -testdev $md0 2 $mdsize00 512 +testdev $md1 1 $mdsize1 1 +testdev $md2 1 $mdsize1 1 +testdev $md0 2 $mdsize11 512 mdadm -Ss mdadm --zero-superblock $dev0 $dev1 $dev2 $dev3 @@ -19,6 +19,6 @@ mdadm -CR $md1 -l1 -n2 $dev0 $dev1 --homehost=testing mdadm -CR $md0 -l0 -n2 $md1 $dev2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize0 64 -testdev $md0 1 $[mdsize0+mdsize00] 512 +testdev $md1 1 $mdsize1 1 +testdev $md0 1 $[mdsize1+mdsize11] 512 mdadm -Ss diff --git a/tests/07autodetect b/tests/07autodetect index 5460c5b..156cced 100644 --- a/tests/07autodetect +++ b/tests/07autodetect @@ -12,15 +12,15 @@ then fi -mdadm -CR $mdp0 -l0 -f -n1 $dev0 -mdadm -CR $mdp1 -l0 -f -n1 $dev1 +mdadm -CR -e 0 $mdp0 -l0 -f -n1 $dev0 +mdadm -CR -e 0 $mdp1 -l0 -f -n1 $dev1 sfdisk $mdp0 >&2 << END ,,FD END sfdisk $mdp1 >&2 << END ,,FD END -mdadm -CR $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1 +mdadm -CR -e 0 $md0 -l1 -n2 ${mdp0}p1 ${mdp1}p1 check resync check raid1 check wait diff --git a/tests/07changelevels b/tests/07changelevels index 633798d..57790a1 100644 --- a/tests/07changelevels +++ b/tests/07changelevels @@ -10,7 +10,7 @@ export MDADM_GROW_VERIFY=1 dotest() { sleep 0.5 check wait - testdev $md0 $1 $mdsize0 64 nd + testdev $md0 $1 $mdsize1 64 nd blockdev --flushbufs $md0 cmp -s -n $[textK*1024] $md0 /tmp/RandFile || { echo cmp failed; exit 2; } # write something new - shift chars 4 space @@ -42,8 +42,8 @@ checkgeo() { bu=/tmp/md-test-backup rm -f $bu -mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2 -testdev $md0 1 $mdsize0 64 +mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2 -z 19968 +testdev $md0 1 $mdsize1 64 dd if=/tmp/RandFile of=$md0 dotest 1 @@ -57,14 +57,14 @@ dotest 3 mdadm -G $md0 -l6 --backup-file $bu dotest 3 -mdadm -G /dev/md0 --array-size $[mdsize0*2] +mdadm -G /dev/md0 --array-size 39936 mdadm -G $md0 -n4 --backup-file $bu dotest 2 mdadm -G $md0 -l5 --backup-file $bu dotest 2 -mdadm -G /dev/md0 --array-size $mdsize0 +mdadm -G /dev/md0 --array-size 19968 mdadm -G $md0 -n2 --backup-file $bu dotest 1 @@ -79,7 +79,7 @@ dotest 3 mdadm $md0 --fail $dev0 -mdadm -G /dev/md0 --array-size $[mdsize0*2] +mdadm -G /dev/md0 --array-size 39936 mdadm -G $md0 -n4 --backup-file $bu dotest 2 mdadm $md0 --fail $dev4 @@ -98,7 +98,7 @@ dotest 2 mdadm -G $md0 -l5 --backup-file $bu dotest 2 -mdadm -G /dev/md0 --array-size $mdsize0 +mdadm -G /dev/md0 --array-size 19968 mdadm -G $md0 -n2 --backup-file $bu dotest 1 mdadm $md0 --fail $dev2 diff --git a/tests/07layouts b/tests/07layouts index 91baec0..e72bb35 100644 --- a/tests/07layouts +++ b/tests/07layouts @@ -12,7 +12,7 @@ export MDADM_GROW_VERITY=1 dotest() { sleep 0.5 check wait - testdev $md0 $1 $mdsize0 512 nd + testdev $md0 $1 $mdsize1 512 nd blockdev --flushbufs $md0 cmp -s -n $[textK*1024] $md0 /tmp/RandFile || { echo cmp failed; exit 2; } # write something new - shift chars 4 space diff --git a/tests/07testreshape5 b/tests/07testreshape5 index 7c2bfc1..724621a 100644 --- a/tests/07testreshape5 +++ b/tests/07testreshape5 @@ -25,7 +25,7 @@ do # test restore: make a raid5 from a file, then do a compare dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$size $dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] $level $nlayout 0 $[size*1024] $devs - mdadm -CR $md0 -amd -l$level -n$disks --assume-clean -c $chunk -p $layout $devs + mdadm -CR -e 1.0 $md0 -amd -l$level -n$disks --assume-clean -c $chunk -p $layout $devs cmp -s -n $[size*1024] $md0 /tmp/RandFile || { echo cmp failed ; exit 2; } # FIXME check parity |