mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: test stacked raid
This commit is contained in:
parent
2055b04c11
commit
d021284bcf
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2014-2015 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -18,8 +18,10 @@ aux have_raid 1 4 0 || skip
|
|||||||
aux prepare_vg 4
|
aux prepare_vg 4
|
||||||
|
|
||||||
# create RAID LVs for data and metadata volumes
|
# create RAID LVs for data and metadata volumes
|
||||||
lvcreate -aey --nosync -L10M --type raid1 -m1 -n $lv1 $vg
|
lvcreate -aey -L10M --type raid1 -m3 -n $lv1 $vg
|
||||||
lvcreate -aey --nosync -L8M --type raid1 -m1 -n $lv2 $vg
|
lvcreate -aey -L8M --type raid1 -m3 -n $lv2 $vg
|
||||||
|
aux wait_for_sync $vg $lv1
|
||||||
|
aux wait_for_sync $vg $lv2
|
||||||
lvchange -an $vg/$lv1
|
lvchange -an $vg/$lv1
|
||||||
|
|
||||||
# conversion fails for internal volumes
|
# conversion fails for internal volumes
|
||||||
@ -28,4 +30,22 @@ invalid lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/${lv2}_rimage_0
|
|||||||
|
|
||||||
lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
|
lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
|
||||||
|
|
||||||
|
lvchange -ay $vg
|
||||||
|
|
||||||
|
lvconvert --splitmirrors 1 --name data2 $vg/${lv1}_tdata "$dev2"
|
||||||
|
lvconvert --splitmirrors 1 --name data3 $vg/${lv1}_tdata "$dev3"
|
||||||
|
lvconvert --splitmirrors 1 --trackchanges $vg/${lv1}_tdata "$dev4"
|
||||||
|
|
||||||
|
lvconvert --splitmirrors 1 --name meta1 $vg/${lv1}_tmeta "$dev1"
|
||||||
|
lvconvert --splitmirrors 1 --name meta2 $vg/${lv1}_tmeta "$dev2"
|
||||||
|
lvconvert --splitmirrors 1 --trackchanges $vg/${lv1}_tmeta "$dev4"
|
||||||
|
|
||||||
|
lvremove -ff $vg/data2 $vg/data3 $vg/meta1 $vg/meta2
|
||||||
|
|
||||||
|
lvconvert --merge $vg/${lv1}_tdata_rimage_1
|
||||||
|
lvconvert --merge $vg/${lv1}_tmeta_rimage_1
|
||||||
|
|
||||||
|
lvconvert -m+1 $vg/${lv1}_tdata "$dev2"
|
||||||
|
lvconvert -m+1 $vg/${lv1}_tmeta "$dev1"
|
||||||
|
|
||||||
vgremove -ff $vg
|
vgremove -ff $vg
|
||||||
|
Loading…
Reference in New Issue
Block a user