Remove some trailing white space

It looks ugly in my editor.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2015-07-02 08:26:30 +10:00
parent 52b6ccad34
commit bcbb92d4ee
38 changed files with 139 additions and 139 deletions

View File

@ -166,7 +166,7 @@ sync_action
monitor. monitor.
8/ mdadm::Grow_reshape() calls ->manage_reshape to oversee the 8/ mdadm::Grow_reshape() calls ->manage_reshape to oversee the
rest of the reshape. rest of the reshape.
9/ mdadm::<format>->manage_reshape(): saves data that will be overwritten by 9/ mdadm::<format>->manage_reshape(): saves data that will be overwritten by
the kernel to either the backup file or the metadata specific location, the kernel to either the backup file or the metadata specific location,
advances sync_max, waits for reshape, ping mdmon, repeat. advances sync_max, waits for reshape, ping mdmon, repeat.
@ -194,7 +194,7 @@ sync_action
kernel-managed-metadata this protection is provided by kernel-managed-metadata this protection is provided by
->reshape_safe, but that does not protect us in the case ->reshape_safe, but that does not protect us in the case
of user-space-managed-metadata. of user-space-managed-metadata.
10/ mdadm::<format>->manage_reshape(): Once reshape completes changes the raid 10/ mdadm::<format>->manage_reshape(): Once reshape completes changes the raid
level back to the nominal raid level (if necessary) level back to the nominal raid level (if necessary)
@ -272,9 +272,9 @@ sync_action
->set_array_state to record the the reshape is complete. ->set_array_state to record the the reshape is complete.
For container-wide reshape, this happens once for each For container-wide reshape, this happens once for each
member array. member array.
... ...
[1]: Linux kernel design patterns - part 3, Neil Brown http://lwn.net/Articles/336262/ [1]: Linux kernel design patterns - part 3, Neil Brown http://lwn.net/Articles/336262/

6
md.4
View File

@ -40,7 +40,7 @@ MULTIPATH (a set of different interfaces to the same device),
and FAULTY (a layer over a single device into which errors can be injected). and FAULTY (a layer over a single device into which errors can be injected).
.SS MD METADATA .SS MD METADATA
Each device in an array may have some Each device in an array may have some
.I metadata .I metadata
stored in the device. This metadata is sometimes called a stored in the device. This metadata is sometimes called a
.BR superblock . .BR superblock .
@ -176,7 +176,7 @@ device is rounded down to a multiple of this chunksize.
A RAID0 array (which has zero redundancy) is also known as a A RAID0 array (which has zero redundancy) is also known as a
striped array. striped array.
A RAID0 array is configured at creation with a A RAID0 array is configured at creation with a
.B "Chunk Size" .B "Chunk Size"
which must be a power of two (prior to Linux 2.6.31), and at least 4 which must be a power of two (prior to Linux 2.6.31), and at least 4
kibibytes. kibibytes.
@ -1024,7 +1024,7 @@ number of times MD will service a full-stripe-write before servicing a
stripe that requires some "prereading". For fairness this defaults to stripe that requires some "prereading". For fairness this defaults to
1. Valid values are 0 to stripe_cache_size. Setting this to 0 1. Valid values are 0 to stripe_cache_size. Setting this to 0
maximizes sequential-write throughput at the cost of fairness to threads maximizes sequential-write throughput at the cost of fairness to threads
doing small or random writes. doing small or random writes.
.SS KERNEL PARAMETERS .SS KERNEL PARAMETERS

View File

@ -2196,11 +2196,11 @@ option. Currently only
.B name .B name
is supported. is supported.
The The
.B name .B name
option updates the subarray name in the metadata, it may not affect the option updates the subarray name in the metadata, it may not affect the
device node name or the device node symlink until the subarray is device node name or the device node symlink until the subarray is
re\-assembled. If updating re\-assembled. If updating
.B name .B name
would change the UUID of an active subarray this operation is blocked, would change the UUID of an active subarray this operation is blocked,
and the command will end in an error. and the command will end in an error.

View File

@ -15,9 +15,9 @@
# ARRAY lines specify information about how to identify arrays so # ARRAY lines specify information about how to identify arrays so
# so that they can be activated # so that they can be activated
# #
# You can have more than one device line and use wild cards. The first # You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb, # example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second # /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks. # line looks for array slices on IDE disks.
# #
#DEVICE /dev/sd[bcdjkl]1 #DEVICE /dev/sd[bcdjkl]1

View File

@ -53,7 +53,7 @@ supports all configuration parameters defined in
.B mdadm.conf .B mdadm.conf
with the exception of with the exception of
.B auto= .B auto=
which is supported only if mdadm was built with the which is supported only if mdadm was built with the
.B \-DMDASSEMBLE_AUTO .B \-DMDASSEMBLE_AUTO
define. define.

View File

@ -19,7 +19,7 @@ testdev $md0 4 $mdsize1 1
mdadm -S $md0 mdadm -S $md0
# now with no superblock # now with no superblock
mdadm -B $md0 -l linear -n5 $dev0 $dev1 $dev2 $dev3 $dev4 mdadm -B $md0 -l linear -n5 $dev0 $dev1 $dev2 $dev3 $dev4
check linear check linear
testdev $md0 5 $size 64 testdev $md0 5 $size 64
mdadm -S $md0 mdadm -S $md0

View File

@ -1,19 +1,19 @@
# create a simple raid0 # create a simple raid0
mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2 mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2
check raid0 check raid0
testdev $md0 3 $mdsize2_l 512 testdev $md0 3 $mdsize2_l 512
mdadm -S $md0 mdadm -S $md0
# now with version-0.90 superblock # now with version-0.90 superblock
mdadm -CR $md0 -e0.90 -l0 -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -e0.90 -l0 -n4 $dev0 $dev1 $dev2 $dev3
check raid0 check raid0
testdev $md0 4 $mdsize0 512 testdev $md0 4 $mdsize0 512
mdadm -S $md0 mdadm -S $md0
# now with no superblock # now with no superblock
mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4 mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
check raid0 check raid0
testdev $md0 5 $size 512 testdev $md0 5 $size 512
mdadm -S $md0 mdadm -S $md0
@ -22,19 +22,19 @@ mdadm -S $md0
# now same again with different chunk size # now same again with different chunk size
for chunk in 4 32 256 for chunk in 4 32 256
do do
mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2 mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2
check raid0 check raid0
testdev $md0 3 $mdsize0 $chunk testdev $md0 3 $mdsize0 $chunk
mdadm -S $md0 mdadm -S $md0
# now with version-1 superblock # now with version-1 superblock
mdadm -CR $md0 -e1.0 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -e1.0 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3
check raid0 check raid0
testdev $md0 4 $mdsize1 $chunk testdev $md0 4 $mdsize1 $chunk
mdadm -S $md0 mdadm -S $md0
# now with no superblock # now with no superblock
mdadm -B $md0 -l0 -n5 --chun=$chunk $dev0 $dev1 $dev2 $dev3 $dev4 mdadm -B $md0 -l0 -n5 --chun=$chunk $dev0 $dev1 $dev2 $dev3 $dev4
check raid0 check raid0
testdev $md0 5 $size $chunk testdev $md0 5 $size $chunk
mdadm -S $md0 mdadm -S $md0

View File

@ -3,28 +3,28 @@
# test version0, version1, and no super # test version0, version1, and no super
# test resync and recovery. # test resync and recovery.
mdadm -CR $md0 -l 1 -n2 $dev0 $dev1 mdadm -CR $md0 -l 1 -n2 $dev0 $dev1
check resync check resync
check raid1 check raid1
testdev $md0 1 $mdsize1a 64 testdev $md0 1 $mdsize1a 64
mdadm -S $md0 mdadm -S $md0
# now with version-0.90 superblock, spare # now with version-0.90 superblock, spare
mdadm -CR $md0 -e0.90 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2 mdadm -CR $md0 -e0.90 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2
check recovery check recovery
check raid1 check raid1
testdev $md0 1 $mdsize0 64 testdev $md0 1 $mdsize0 64
mdadm -S $md0 mdadm -S $md0
# now with no superblock # now with no superblock
mdadm -B $md0 -l mirror -n2 $dev0 $dev1 mdadm -B $md0 -l mirror -n2 $dev0 $dev1
check resync check resync
check raid1 check raid1
testdev $md0 1 $size 1 testdev $md0 1 $size 1
mdadm -S $md0 mdadm -S $md0
# again, but with no resync # again, but with no resync
mdadm -B $md0 -l 1 --assume-clean -n2 $dev0 $dev1 mdadm -B $md0 -l 1 --assume-clean -n2 $dev0 $dev1
check raid1 check raid1
check nosync check nosync
testdev $md0 1 $size 1 testdev $md0 1 $size 1

View File

@ -1,13 +1,13 @@
# create a simple raid4 set # create a simple raid4 set
mdadm -CfR $md0 -l 4 -n3 $dev0 $dev1 $dev2 mdadm -CfR $md0 -l 4 -n3 $dev0 $dev1 $dev2
check resync ; check raid[45] check resync ; check raid[45]
testdev $md0 2 $mdsize1 512 testdev $md0 2 $mdsize1 512
mdadm -S $md0 mdadm -S $md0
# now with version-1 superblock # now with version-1 superblock
mdadm -CR $md0 -e1 --level=raid4 -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -e1 --level=raid4 -n4 $dev0 $dev1 $dev2 $dev3
check recovery; check raid[45] check recovery; check raid[45]
testdev $md0 3 $mdsize1 512 testdev $md0 3 $mdsize1 512
mdadm -S $md0 mdadm -S $md0

View File

@ -1,13 +1,13 @@
# create a simple raid5 set # create a simple raid5 set
mdadm -CfR $md0 -e 0.90 -l 5 -n3 $dev0 $dev1 $dev2 mdadm -CfR $md0 -e 0.90 -l 5 -n3 $dev0 $dev1 $dev2
check resync check resync
testdev $md0 2 $mdsize0 512 testdev $md0 2 $mdsize0 512
mdadm -S $md0 mdadm -S $md0
# now with version-1 superblock # now with version-1 superblock
mdadm -CR $md0 -e1 --level=raid5 -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -e1 --level=raid5 -n4 $dev0 $dev1 $dev2 $dev3
check recovery check recovery
testdev $md0 3 $mdsize1 512 testdev $md0 3 $mdsize1 512
mdadm -S $md0 mdadm -S $md0
@ -17,13 +17,13 @@ mdadm -S $md0
for lo in la ra left-symmetric right-symmetric for lo in la ra left-symmetric right-symmetric
do do
mdadm -CfR $md0 -l 5 -p $lo -n3 $dev0 $dev1 $dev2 mdadm -CfR $md0 -l 5 -p $lo -n3 $dev0 $dev1 $dev2
check resync ; check raid5 check resync ; check raid5
testdev $md0 2 $mdsize1 512 testdev $md0 2 $mdsize1 512
mdadm -S $md0 mdadm -S $md0
# now with version-1 superblock # now with version-1 superblock
mdadm -CR $md0 -e1 --level=raid5 --layout $lo -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -e1 --level=raid5 --layout $lo -n4 $dev0 $dev1 $dev2 $dev3
check recovery ; check raid5 check recovery ; check raid5
testdev $md0 3 $mdsize1 512 testdev $md0 3 $mdsize1 512
mdadm -S $md0 mdadm -S $md0

View File

@ -1,13 +1,13 @@
# create a simple raid6 set # create a simple raid6 set
mdadm -CfR $md0 -e0.90 -l 6 -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CfR $md0 -e0.90 -l 6 -n4 $dev0 $dev1 $dev2 $dev3
check resync ; check raid6 check resync ; check raid6
testdev $md0 2 $mdsize0 512 testdev $md0 2 $mdsize0 512
mdadm -S $md0 mdadm -S $md0
# now with version-1 superblock # now with version-1 superblock
mdadm -CR $md0 -e1 --level=raid6 -n5 $dev0 $dev1 $dev2 $dev3 $dev4 mdadm -CR $md0 -e1 --level=raid6 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
check resync ; check raid6 check resync ; check raid6
testdev $md0 3 $mdsize1 512 testdev $md0 3 $mdsize1 512
mdadm -S $md0 mdadm -S $md0

View File

@ -5,23 +5,23 @@
mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing
check resync check resync
mdadm $md0 --fail $dev2 mdadm $md0 --fail $dev2
check resync check resync
mdadm $md0 --fail $dev1 mdadm $md0 --fail $dev1
sleep 1 sleep 1
check nosync check nosync
check state U___ check state U___
mdadm $md0 --add $dev4 $dev3 mdadm $md0 --add $dev4 $dev3
check recovery check recovery
# there could be two separate recoveries, one for each dev # there could be two separate recoveries, one for each dev
check wait check wait
check wait check wait
mdadm $md0 --remove $dev2 $dev1 mdadm $md0 --remove $dev2 $dev1
check nosync check nosync
check state UUU_ check state UUU_
mdadm --zero-superblock $dev2 mdadm --zero-superblock $dev2
mdadm $md0 -a $dev2 mdadm $md0 -a $dev2
check recovery check recovery
check wait check wait
check state UUUU check state UUUU

View File

@ -4,22 +4,22 @@
# Add two more, fail and remove one # Add two more, fail and remove one
# wait for sync to complete, fail, remove, re-add # wait for sync to complete, fail, remove, re-add
mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3 mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3
check recovery check recovery
mdadm $md0 --fail $dev3 mdadm $md0 --fail $dev3
sleep 1 sleep 1
check nosync check nosync
check state UUU_ check state UUU_
mdadm $md0 --add $dev4 $dev5 mdadm $md0 --add $dev4 $dev5
check recovery check recovery
check wait check wait
mdadm $md0 --fail $dev0 mdadm $md0 --fail $dev0
mdadm $md0 --remove $dev3 $dev0 mdadm $md0 --remove $dev3 $dev0
check recovery check recovery
check state _UUU check state _UUU
mdadm $md0 -a $dev3 mdadm $md0 -a $dev3
check recovery check recovery
check wait check wait
check state UUUU check state UUUU

View File

@ -1,7 +1,7 @@
# Make a raid1, add a device, then remove it again. # Make a raid1, add a device, then remove it again.
mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2 mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2
check resync check resync
check wait check wait
check state UU check state UU
@ -11,7 +11,7 @@ check recovery
check wait check wait
check state UUU check state UUU
mdadm $md0 --fail $dev0 mdadm $md0 --fail $dev0
check state _UU check state _UU
mdadm --grow $md0 -n 2 mdadm --grow $md0 -n 2
@ -21,7 +21,7 @@ mdadm -S $md0
# same again for version-1 # same again for version-1
mdadm -CR $md0 -l1 -n2 -e1.2 -x1 $dev0 $dev1 $dev2 mdadm -CR $md0 -l1 -n2 -e1.2 -x1 $dev0 $dev1 $dev2
check resync check resync
check wait check wait
check state UU check state UU
@ -31,7 +31,7 @@ check recovery
check wait check wait
check state UUU check state UUU
mdadm $md0 --fail $dev0 mdadm $md0 --fail $dev0
check state _UU check state _UU
mdadm --grow $md0 -n 2 mdadm --grow $md0 -n 2

View File

@ -2,7 +2,7 @@
# create a small raid1 array, make it larger. Then make it smaller # create a small raid1 array, make it larger. Then make it smaller
mdadm -CR $md0 -e 0.90 --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 wait
check state UUU check state UUU
testdev $md0 1 $[size/2] 1 testdev $md0 1 $[size/2] 1
@ -19,7 +19,7 @@ testdev $md0 1 $[size/2] 1
mdadm -S $md0 mdadm -S $md0
# same again with version 1.1 superblock # same again with version 1.1 superblock
mdadm -CR $md0 --level raid1 --metadata=1.1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 mdadm -CR $md0 --level raid1 --metadata=1.1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
check wait check wait
check state UUU check state UUU
testdev $md0 1 $[size/2] 1 testdev $md0 1 $[size/2] 1

View File

@ -2,7 +2,7 @@
# create a small raid5 array, make it larger. Then make it smaller # create a small raid5 array, make it larger. Then make it smaller
mdadm -CR $md0 -e0.90 --level raid5 --chunk=64 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3 mdadm -CR $md0 -e0.90 --level raid5 --chunk=64 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
check wait check wait
check state UUU check state UUU
testdev $md0 2 $[size/2] 32 testdev $md0 2 $[size/2] 32
@ -19,7 +19,7 @@ testdev $md0 2 $[size/2] 32
mdadm -S $md0 mdadm -S $md0
# same again with version 1.1 superblock # same again with version 1.1 superblock
mdadm -CR $md0 --level raid5 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4 mdadm -CR $md0 --level raid5 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
check wait check wait
check state UUUU check state UUUU
testdev $md0 3 $[size/2] 128 testdev $md0 3 $[size/2] 128

View File

@ -2,7 +2,7 @@
# create a small raid6 array, make it larger. Then make it smaller # create a small raid6 array, make it larger. Then make it smaller
mdadm -CR $md0 -e 0.90 --level raid6 --chunk=64 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4 mdadm -CR $md0 -e 0.90 --level raid6 --chunk=64 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
check wait check wait
check state UUUU check state UUUU
testdev $md0 2 $[size/2] 32 testdev $md0 2 $[size/2] 32
@ -19,7 +19,7 @@ testdev $md0 2 $[size/2] 32
mdadm -S $md0 mdadm -S $md0
# same again with version 1.1 superblock # same again with version 1.1 superblock
mdadm -CR $md0 --level raid6 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4 mdadm -CR $md0 --level raid6 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
check wait check wait
check state UUUU check state UUUU
testdev $md0 2 $[size/2] 128 testdev $md0 2 $[size/2] 128

View File

@ -4,63 +4,63 @@
# uuid, md-minor on command line with wildcard devices # uuid, md-minor on command line with wildcard devices
# mdadm.conf file # mdadm.conf file
mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2 mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2
check raid0 check raid0
tst="testdev $md2 3 $mdsize1_l 512" tst="testdev $md2 3 $mdsize1_l 512"
$tst $tst
uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'`
mdadm -S $md2 mdadm -S $md2
mdadm -A $md2 $dev0 $dev1 $dev2 mdadm -A $md2 $dev0 $dev1 $dev2
$tst $tst
mdadm -S $md2 mdadm -S $md2
mdadm -A $md2 -u $uuid $devlist mdadm -A $md2 -u $uuid $devlist
$tst $tst
mdadm -S $md2 mdadm -S $md2
mdadm --assemble $md2 --name=2 $devlist mdadm --assemble $md2 --name=2 $devlist
$tst $tst
mdadm -S $md2 mdadm -S $md2
conf=$targetdir/mdadm.conf conf=$targetdir/mdadm.conf
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 UUID=$uuid echo array $md2 UUID=$uuid
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 name=2 echo array $md2 name=2
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 devices=$dev0,$dev1,$dev2 echo array $md2 devices=$dev0,$dev1,$dev2
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
echo "DEVICE $devlist" > $conf echo "DEVICE $devlist" > $conf
mdadm -Db $md2 >> $conf mdadm -Db $md2 >> $conf
mdadm -S $md2 mdadm -S $md2
mdadm --assemble --scan --config=$conf $md2 mdadm --assemble --scan --config=$conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
mdadm --assemble --scan --config=$conf $md2 mdadm --assemble --scan --config=$conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
@ -68,7 +68,7 @@ mdadm -S $md2
### Now for version 0... ### Now for version 0...
mdadm --zero-superblock $dev0 $dev1 $dev2 mdadm --zero-superblock $dev0 $dev1 $dev2
mdadm -CR $md2 -l0 --metadata=0.90 -n3 $dev0 $dev1 $dev2 mdadm -CR $md2 -l0 --metadata=0.90 -n3 $dev0 $dev1 $dev2
check raid0 check raid0
tst="testdev $md2 3 $mdsize0 512" tst="testdev $md2 3 $mdsize0 512"
$tst $tst
@ -76,56 +76,56 @@ $tst
uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'`
mdadm -S $md2 mdadm -S $md2
mdadm -A $md2 $dev0 $dev1 $dev2 mdadm -A $md2 $dev0 $dev1 $dev2
$tst $tst
mdadm -S $md2 mdadm -S $md2
mdadm -A $md2 -u $uuid $devlist mdadm -A $md2 -u $uuid $devlist
$tst $tst
mdadm -S $md2 mdadm -S $md2
mdadm --assemble $md2 --super-minor=2 $devlist # mdadm --assemble $md2 --super-minor=2 $devlist #
$tst $tst
mdadm -S $md2 mdadm -S $md2
conf=$targetdir/mdadm.conf conf=$targetdir/mdadm.conf
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 UUID=$uuid echo array $md2 UUID=$uuid
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 super-minor=2 echo array $md2 super-minor=2
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md2 devices=$dev0,$dev1,$dev2 echo array $md2 devices=$dev0,$dev1,$dev2
} > $conf } > $conf
mdadm -As -c $conf $md2 mdadm -As -c $conf $md2
$tst $tst
echo "DEVICE $devlist" > $conf echo "DEVICE $devlist" > $conf
mdadm -Db $md2 >> $conf mdadm -Db $md2 >> $conf
mdadm -S $md2 mdadm -S $md2
mdadm --assemble --scan --config=$conf $md2 mdadm --assemble --scan --config=$conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2
echo " metadata=1 devices=$dev0,$dev1,$dev2" >> $conf echo " metadata=1 devices=$dev0,$dev1,$dev2" >> $conf
mdadm --assemble --scan --config=$conf $md2 mdadm --assemble --scan --config=$conf $md2
$tst $tst
mdadm -S $md2 mdadm -S $md2

View File

@ -2,108 +2,108 @@
# create a raid5 array and assemble it in various ways, # create a raid5 array and assemble it in various ways,
# including with missing devices. # including with missing devices.
mdadm -CR -e 0.90 $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" tst="check raid5 ;testdev $md1 2 $mdsize0 512 ; mdadm -S $md1"
uuid=`mdadm -Db $md1 | sed 's/.*UUID=//'` uuid=`mdadm -Db $md1 | sed 's/.*UUID=//'`
check wait check wait
eval $tst eval $tst
mdadm -A $md1 $dev0 $dev1 $dev2 mdadm -A $md1 $dev0 $dev1 $dev2
eval $tst eval $tst
mdadm -A $md1 -u $uuid $devlist mdadm -A $md1 -u $uuid $devlist
eval $tst eval $tst
mdadm -A $md1 -m 1 $devlist mdadm -A $md1 -m 1 $devlist
eval $tst eval $tst
conf=$targetdir/mdadm.conf conf=$targetdir/mdadm.conf
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 UUID=$uuid echo array $md1 UUID=$uuid
} > $conf } > $conf
mdadm -As -c $conf $md1 mdadm -As -c $conf $md1
eval $tst eval $tst
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 super-minor=1 echo array $md1 super-minor=1
} > $conf } > $conf
mdadm -As -c $conf mdadm -As -c $conf
eval $tst eval $tst
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 devices=$dev0,$dev1,$dev2 echo array $md1 devices=$dev0,$dev1,$dev2
} > $conf } > $conf
mdadm -As -c $conf mdadm -As -c $conf
echo "DEVICE $devlist" > $conf echo "DEVICE $devlist" > $conf
mdadm -Db $md1 >> $conf mdadm -Db $md1 >> $conf
eval $tst eval $tst
mdadm --assemble --scan --config=$conf $md1 mdadm --assemble --scan --config=$conf $md1
eval $tst eval $tst
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
mdadm --assemble --scan --config=$conf $md1 mdadm --assemble --scan --config=$conf $md1
eval $tst eval $tst
### Now with a missing device ### Now with a missing device
mdadm -AR $md1 $dev0 $dev2 # mdadm -AR $md1 $dev0 $dev2 #
check state U_U check state U_U
eval $tst eval $tst
mdadm -A $md1 -u $uuid $devlist mdadm -A $md1 -u $uuid $devlist
check state U_U check state U_U
eval $tst eval $tst
mdadm -A $md1 -m 1 $devlist mdadm -A $md1 -m 1 $devlist
check state U_U check state U_U
eval $tst eval $tst
conf=$targetdir/mdadm.conf conf=$targetdir/mdadm.conf
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 UUID=$uuid echo array $md1 UUID=$uuid
} > $conf } > $conf
mdadm -As -c $conf $md1 mdadm -As -c $conf $md1
check state U_U check state U_U
eval $tst eval $tst
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 super-minor=1 echo array $md1 super-minor=1
} > $conf } > $conf
mdadm -As -c $conf mdadm -As -c $conf
check state U_U check state U_U
eval $tst eval $tst
{ {
echo DEVICE $devlist echo DEVICE $devlist
echo array $md1 devices=$dev0,$dev1,$dev2 echo array $md1 devices=$dev0,$dev1,$dev2
} > $conf } > $conf
mdadm -As -c $conf mdadm -As -c $conf
echo "DEVICE $devlist" > $conf echo "DEVICE $devlist" > $conf
mdadm -Db $md1 >> $conf mdadm -Db $md1 >> $conf
check state U_U check state U_U
eval $tst eval $tst
mdadm --assemble --scan --config=$conf $md1 mdadm --assemble --scan --config=$conf $md1
check state U_U check state U_U
eval $tst eval $tst
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
mdadm --assemble --scan --config=$conf $md1 mdadm --assemble --scan --config=$conf $md1
check state U_U check state U_U
eval $tst eval $tst

View File

@ -1,15 +1,15 @@
# create a raid0, re-assemble with a different super-minor # create a raid0, re-assemble with a different super-minor
mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2 mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2
testdev $md0 3 $mdsize0 512 testdev $md0 3 $mdsize0 512
minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
mdadm -S /dev/md0 mdadm -S /dev/md0
mdadm -A $md1 $dev0 $dev1 $dev2 mdadm -A $md1 $dev0 $dev1 $dev2
minor2=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` minor2=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
mdadm -S /dev/md1 mdadm -S /dev/md1
mdadm -A $md1 --update=super-minor $dev0 $dev1 $dev2 mdadm -A $md1 --update=super-minor $dev0 $dev1 $dev2
minor3=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'` minor3=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
mdadm -S /dev/md1 mdadm -S /dev/md1

View File

@ -2,14 +2,14 @@ set -i
# create a raid1 array, let it sync, then re-assemble with a force-sync # create a raid1 array, let it sync, then re-assemble with a force-sync
mdadm -CR $md0 -l1 -n2 $dev0 $dev1 mdadm -CR $md0 -l1 -n2 $dev0 $dev1
check wait check wait
mdadm -S $md0 mdadm -S $md0
mdadm -A $md0 $dev0 $dev1 mdadm -A $md0 $dev0 $dev1
check nosync check nosync
mdadm -S $md0 mdadm -S $md0
mdadm -A $md0 -U resync $dev0 $dev1 mdadm -A $md0 -U resync $dev0 $dev1
check resync check resync
mdadm -S $md0 mdadm -S $md0

View File

@ -1,4 +1,4 @@
# #
# create a raid1 without any bitmap, add the bitmap and then write to # create a raid1 without any bitmap, add the bitmap and then write to
# the device. This should catch the case where the bitmap is created # the device. This should catch the case where the bitmap is created
# but not reloaded correctly, such as the case fixed by # but not reloaded correctly, such as the case fixed by

View File

@ -1,4 +1,4 @@
# #
# create a raid1 without any bitmap, add the bitmap and then write to # create a raid1 without any bitmap, add the bitmap and then write to
# the device. This should catch the case where the bitmap is created # the device. This should catch the case where the bitmap is created
# but not reloaded correctly, such as the case fixed by # but not reloaded correctly, such as the case fixed by

View File

@ -1,10 +1,10 @@
# #
# create a raid1 with a bitmap file # create a raid1 with a bitmap file
# #
bmf=$targetdir/bitmap bmf=$targetdir/bitmap
rm -f $bmf rm -f $bmf
mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2 mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2
check wait check wait
testdev $md0 1 $mdsize1a 64 testdev $md0 1 $mdsize1a 64
mdadm -S $md0 mdadm -S $md0
@ -24,7 +24,7 @@ testdev $md0 1 $mdsize1a 64
sleep 4 sleep 4
dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -21,7 +21,7 @@ dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
#echo $dirty1 $dirty2 $dirty3 $dirty4 #echo $dirty1 $dirty2 $dirty3 $dirty4
if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ] if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ]
then then
echo bad dirty counts echo bad dirty counts
exit 1 exit 1
fi fi

View File

@ -19,7 +19,7 @@ dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
#echo $dirty1 $dirty2 $dirty3 $dirty4 #echo $dirty1 $dirty2 $dirty3 $dirty4
if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ] if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ]
then then
echo bad dirty counts echo bad dirty counts
exit 1 exit 1
fi fi

View File

@ -19,7 +19,7 @@ dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
#echo $dirty1 $dirty2 $dirty3 $dirty4 #echo $dirty1 $dirty2 $dirty3 $dirty4
if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ] if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ]
then then
echo bad dirty counts echo bad dirty counts
exit 1 exit 1
fi fi

View File

@ -1,8 +1,8 @@
# #
# create a raid1 with an internal bitmap # create a raid1 with an internal bitmap
# #
mdadm --create -e0.90 --run $md0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 mdadm --create -e0.90 --run $md0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2
check wait check wait
testdev $md0 1 $mdsize0 64 testdev $md0 1 $mdsize0 64
mdadm -S $md0 mdadm -S $md0
@ -22,7 +22,7 @@ testdev $md0 1 $mdsize0 64
sleep 4 sleep 4
dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -1,8 +1,8 @@
# #
# create a raid1 with an internal bitmap # create a raid1 with an internal bitmap
# #
mdadm --create --run $md0 --metadata=1.0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 mdadm --create --run $md0 --metadata=1.0 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2
check wait check wait
check bitmap check bitmap
testdev $md0 1 $mdsize1b 64 testdev $md0 1 $mdsize1b 64
@ -23,7 +23,7 @@ testdev $md0 1 $mdsize1b 64
sleep 4 sleep 4
dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -1,8 +1,8 @@
# #
# create a raid1 with an internal bitmap # create a raid1 with an internal bitmap
# #
mdadm --create --run $md0 --metadata=1.1 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2 mdadm --create --run $md0 --metadata=1.1 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk=4 $dev1 $dev2
check wait check wait
check bitmap check bitmap
testdev $md0 1 $mdsize11 64 testdev $md0 1 $mdsize11 64
@ -24,7 +24,7 @@ testdev $md0 1 $mdsize11 64
sleep 4 sleep 4
dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -1,8 +1,8 @@
# #
# create a raid1 with an internal bitmap # create a raid1 with an internal bitmap
# #
mdadm --create --run $md0 --metadata=1.2 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk 4 $dev1 $dev2 mdadm --create --run $md0 --metadata=1.2 --level=1 -n2 --delay=1 --bitmap internal --bitmap-chunk 4 $dev1 $dev2
check wait check wait
check bitmap check bitmap
testdev $md0 1 $mdsize12 64 testdev $md0 1 $mdsize12 64
@ -23,7 +23,7 @@ testdev $md0 1 $mdsize12 64
sleep 4 sleep 4
dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -1,12 +1,12 @@
# #
# create a raid1 with 3 devices and a bitmap file # create a raid1 with 3 devices and a bitmap file
# make sure resync does right thing. # make sure resync does right thing.
# #
# #
bmf=$targetdir/bitmap bmf=$targetdir/bitmap
rm -f $bmf rm -f $bmf
mdadm --create -e0.90 --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 check wait
testdev $md0 1 $mdsize0 64 testdev $md0 1 $mdsize0 64
mdadm -S $md0 mdadm -S $md0
@ -26,7 +26,7 @@ testdev $md0 1 $mdsize0 64
sleep 4 sleep 4
dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ] if [ $dirty3 -lt 400 ]
then then
echo >&2 "ERROR dirty count $dirty3 is too small" echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2 exit 2
fi fi

View File

@ -27,7 +27,7 @@ checkgeo() {
sleep 0.5 sleep 0.5
check wait check wait
sleep 1 sleep 1
for attr in level raid_disks chunk_size layout for attr in level raid_disks chunk_size layout
do do
if [ $# -gt 0 ] ; then if [ $# -gt 0 ] ; then
val=$1 val=$1

View File

@ -28,7 +28,7 @@ checkgeo() {
shift shift
sleep 0.5 sleep 0.5
check wait check wait
for attr in level raid_disks chunk_size layout for attr in level raid_disks chunk_size layout
do do
if [ $# -gt 0 ] ; then if [ $# -gt 0 ] ; then
val=$1 val=$1
@ -40,7 +40,7 @@ checkgeo() {
fi fi
done done
} }
bu=/tmp/md-test-backup bu=/tmp/md-test-backup
rm -f $bu rm -f $bu

View File

@ -78,7 +78,7 @@ mdadm -Ss
# and now assemble fully incrementally. # and now assemble fully incrementally.
for i in $dev8 $dev9 $dev10 $dev11 $dev12 for i in $dev8 $dev9 $dev10 $dev11 $dev12
do do
mdadm -I $i -c /var/tmp/mdadm.conf mdadm -I $i -c /var/tmp/mdadm.conf
done done
check nosync check nosync

View File

@ -52,11 +52,11 @@ fi
#[ -f /var/tmp/mdmon.log ] && cat /var/tmp/mdmon.log #[ -f /var/tmp/mdmon.log ] && cat /var/tmp/mdmon.log
# Now reassemble # Now reassemble
# Note that we add the previously missing disks first. # Note that we add the previously missing disks first.
# $dev10 should have a higher seq number than $dev8 # $dev10 should have a higher seq number than $dev8
for d in $dev8 $dev9 $dev10 $dev11; do for d in $dev8 $dev9 $dev10 $dev11; do
mdadm -I $d mdadm -I $d
done done
mdadm -IRs || true mdadm -IRs || true

View File

@ -10,7 +10,7 @@ device_list="$dev0 $dev1"
vol0_level=1 vol0_level=1
vol0_comp_size=$((5 * 1024)) vol0_comp_size=$((5 * 1024))
vol0_chunk=64 vol0_chunk=64
vol0_num_comps=$(( $num_disks - 1 )) vol0_num_comps=$(( $num_disks - 1 ))
vol0_offset=0 vol0_offset=0
# After: RAID 0 volume, 1 disks, 64k chunk size # After: RAID 0 volume, 1 disks, 64k chunk size

View File

@ -6,7 +6,7 @@ add/remove/fail
raid5 DONE raid5 DONE
raid6/10 needed?? raid6/10 needed??
assemble assemble
by devices DONE by devices DONE
by uuid DONE by uuid DONE
by superminor DONE by superminor DONE
@ -23,7 +23,7 @@ bitmap
separate file separate file
internal internal
filename in config file filename in config file
examine examine
--scan --scan
--brief --brief