diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-24 14:34:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-24 14:34:34 +0000 |
commit | 946b54554e13d6a97940df936123855e0a305abc (patch) | |
tree | 80a778fbd7bb3c7858cfac572df1cb08cfa4f988 /clustermd_tests/01r10_Grow_bitmap-switch | |
parent | Initial commit. (diff) | |
download | mdadm-upstream/4.2.tar.xz mdadm-upstream/4.2.zip |
Adding upstream version 4.2.upstream/4.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'clustermd_tests/01r10_Grow_bitmap-switch')
-rw-r--r-- | clustermd_tests/01r10_Grow_bitmap-switch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/clustermd_tests/01r10_Grow_bitmap-switch b/clustermd_tests/01r10_Grow_bitmap-switch new file mode 100644 index 0000000..1794719 --- /dev/null +++ b/clustermd_tests/01r10_Grow_bitmap-switch @@ -0,0 +1,51 @@ +#!/bin/bash + +mdadm -CR $md0 -l10 -b clustered --layout n2 -n2 $dev0 $dev1 --assume-clean +ssh $NODE2 mdadm -A $md0 $dev0 $dev1 +check all nosync +check all raid10 +check all bitmap +check all state UU + +# switch 'clustered' bitmap to 'none', and then 'none' to 'internal' +stop_md $NODE2 $md0 +mdadm --grow $md0 --bitmap=none +[ $? -eq '0' ] || + die "$NODE1: change bitmap 'clustered' to 'none' failed." +mdadm -X $dev0 $dev1 &> /dev/null +[ $? -eq '0' ] && + die "$NODE1: bitmap still exists in member_disks." +check all nobitmap +mdadm --grow $md0 --bitmap=internal +[ $? -eq '0' ] || + die "$NODE1: change bitmap 'none' to 'internal' failed." +sleep 1 +mdadm -X $dev0 $dev1 &> /dev/null +[ $? -eq '0' ] || + die "$NODE1: create 'internal' bitmap failed." +check $NODE1 bitmap + +# switch 'internal' bitmap to 'none', and then 'none' to 'clustered' +mdadm --grow $md0 --bitmap=none +[ $? -eq '0' ] || + die "$NODE1: change bitmap 'internal' to 'none' failed." +mdadm -X $dev0 $dev1 &> /dev/null +[ $? -eq '0' ] && + die "$NODE1: bitmap still exists in member_disks." +check $NODE1 nobitmap +mdadm --grow $md0 --bitmap=clustered +[ $? -eq '0' ] || + die "$NODE1: change bitmap 'none' to 'clustered' failed." +ssh $NODE2 mdadm -A $md0 $dev0 $dev1 +sleep 1 +for ip in $NODES +do + ssh $ip "mdadm -X $dev0 $dev1 | grep -q 'Cluster name'" || + die "$ip: create 'clustered' bitmap failed." +done +check all bitmap +check all state UU +check all dmesg +stop_md all $md0 + +exit 0 |