2017-07-02 22:38:32 +03:00
#!/usr/bin/env bash
2017-02-03 22:39:40 +03:00
# Copyright (C) 2016,2017 Red Hat, Inc. All rights reserved.
2016-08-09 15:17:26 +03:00
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
2017-02-07 18:52:04 +03:00
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA2110-1301 USA
2016-08-09 15:17:26 +03:00
SKIP_WITH_LVMLOCKD = 1
SKIP_WITH_LVMPOLLD = 1
. lib/inittest
2017-02-13 00:28:40 +03:00
which mkfs.ext4 || skip
2016-08-09 15:17:26 +03:00
aux have_raid 1 9 0 || skip
2016-10-27 17:38:15 +03:00
correct_raid4_layout = 0
aux have_raid 1 9 1 && correct_raid4_layout = 1
2016-10-27 12:38:16 +03:00
2017-02-13 00:28:40 +03:00
aux prepare_vg 8
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
2017-03-20 16:18:50 +03:00
# FIXME: lvconvert leaks 'error' devices
detect_error_leak_( )
{
2017-07-13 22:09:45 +03:00
local err = ""
2017-03-20 16:18:50 +03:00
2017-07-07 11:10:36 +03:00
for i in $( dmsetup info -c -o name --noheadings) ; do
case " $i " in
" $vg * " ) ( dmsetup table " $i " | grep "error " ) && err = " $err $i " ; ;
esac
done
test -z " $err " || {
dmsetup table | grep $vg
dmsetup ls --tree
die " Device(s) $err should not be here. "
}
2017-03-20 16:18:50 +03:00
}
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
function _lvcreate
{
local level = $1
local req_stripes = $2
local stripes = $3
local size = $4
local vg = $5
local lv = $6
lvcreate -y -aey --type $level -i $req_stripes -L $size -n $lv $vg
check lv_field $vg /$lv segtype " $level "
2017-03-01 20:50:35 +03:00
check lv_field $vg /$lv data_stripes $req_stripes
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
check lv_field $vg /$lv stripes $stripes
2017-02-13 00:28:40 +03:00
mkfs.ext4 " $DM_DEV_DIR / $vg / $lv "
fsck -fn " $DM_DEV_DIR / $vg / $lv "
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
}
function _lvconvert
{
local req_level = $1
local level = $2
2017-03-01 20:50:35 +03:00
local data_stripes = $3
local stripes = $4
local vg = $5
local lv = $6
2017-07-13 22:09:45 +03:00
local region_size = ${ 7 - }
2017-02-07 18:52:04 +03:00
local wait_and_check = 1
local R = ""
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
2017-02-07 18:52:04 +03:00
[ -n " $region_size " ] && R = " -R $region_size "
[ " ${ level : 0 : 7 } " = "striped" ] && wait_and_check = 0
[ " ${ level : 0 : 5 } " = "raid0" ] && wait_and_check = 0
lvconvert -y --ty $req_level $R $vg /$lv
2017-03-20 16:18:50 +03:00
detect_error_leak_
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
check lv_field $vg /$lv segtype " $level "
2017-03-01 20:50:35 +03:00
check lv_field $vg /$lv data_stripes $data_stripes
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
check lv_field $vg /$lv stripes $stripes
2017-02-07 18:52:04 +03:00
if [ " $wait_and_check " -eq 1 ]
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
then
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv "
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv
fi
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv "
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
}
function _invalid_raid5_conversions
{
2017-02-07 18:52:04 +03:00
local vg = $1
local lv = $2
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
2017-03-01 20:50:35 +03:00
not _lvconvert striped 4 4 $vg $lv1
not _lvconvert raid0 raid0 4 4 $vg $lv1
not _lvconvert raid0_meta raid0_meta 4 4 $vg $lv1
not _lvconvert raid4 raid4 4 5 $vg $lv1
not _lvconvert raid5_ls raid5_ls 4 5 $vg $lv1
not _lvconvert raid5_rs raid5_rs 4 5 $vg $lv1
not _lvconvert raid5_la raid5_la 4 5 $vg $lv1
not _lvconvert raid5_ra raid5_ra 4 5 $vg $lv1
not _lvconvert raid6_zr raid6_zr 4 6 $vg $lv1
not _lvconvert raid6_nr raid6_nr 4 6 $vg $lv1
not _lvconvert raid6_nc raid6_nc 4 6 $vg $lv1
not _lvconvert raid6_n_6 raid6_n_6 4 6 $vg $lv1
not _lvconvert raid6 raid6_n_6 4 6 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
}
2016-08-09 15:17:26 +03:00
2017-03-17 00:10:32 +03:00
# Check raid6 conversion constrainst of minimum 3 stripes
_lvcreate striped 2 2 4m $vg $lv1
not _lvconvert raid6 raid6_n_6 2 4 $vg $lv1
lvremove -y $vg
_lvcreate raid0 3 3 4m $vg $lv1
_lvconvert raid6 raid6_n_6 3 5 $vg $lv1
lvremove -y $vg
# Delay 1st leg so that rebuilding status characters
2016-08-09 15:17:26 +03:00
# can be read before resync finished too quick.
2017-02-07 18:52:04 +03:00
# aux delay_dev "$dev1" 1
2016-08-09 15:17:26 +03:00
# Create 3-way mirror
2017-02-13 00:28:40 +03:00
lvcreate --yes -aey --type mirror -R 64K -m 2 -L8M -n $lv1 $vg
2016-08-09 15:17:26 +03:00
check lv_field $vg /$lv1 segtype "mirror"
check lv_field $vg /$lv1 stripes 3
2017-02-07 18:52:04 +03:00
check lv_field $vg /$lv1 regionsize "64.00k"
2017-02-13 00:28:40 +03:00
mkfs.ext4 " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
aux wait_for_sync $vg $lv1
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
# Convert 3-way to 4-way mirror
2017-04-06 19:47:41 +03:00
lvconvert -y -m 3 $vg /$lv1
2017-03-20 16:18:50 +03:00
detect_error_leak_
2016-08-09 15:17:26 +03:00
check lv_field $vg /$lv1 segtype "mirror"
check lv_field $vg /$lv1 stripes 4
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
aux wait_for_sync $vg $lv1
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
# Takeover 4-way mirror to raid1
2017-02-07 18:52:04 +03:00
lvconvert --yes --type raid1 -R 64k $vg /$lv1
2017-03-20 16:18:50 +03:00
detect_error_leak_
2016-08-09 15:17:26 +03:00
check lv_field $vg /$lv1 segtype "raid1"
check lv_field $vg /$lv1 stripes 4
2017-02-07 18:52:04 +03:00
check lv_field $vg /$lv1 regionsize "64.00k"
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
## Convert 4-way raid1 to 5-way
2017-04-06 19:47:41 +03:00
lvconvert -y -m 4 -R 128K $vg /$lv1
2017-03-20 16:18:50 +03:00
detect_error_leak_
2016-08-09 15:17:26 +03:00
check lv_field $vg /$lv1 segtype "raid1"
check lv_field $vg /$lv1 stripes 5
2017-02-24 06:36:03 +03:00
check lv_field $vg /$lv1 regionsize "128.00k"
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
aux wait_for_sync $vg $lv1
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
# FIXME: enable once lvconvert rejects early
## Try converting 4-way raid1 to 9-way
#not lvconvert --yes -m 8 $vg/$lv1
#check lv_field $vg/$lv1 segtype "raid1"
#check lv_field $vg/$lv1 stripes 4
# Convert 5-way raid1 to 2-way
lvconvert --yes -m 1 $vg /$lv1
2017-03-20 16:18:50 +03:00
detect_error_leak_
2016-08-09 15:17:26 +03:00
lvs $vg /$lv1
dmsetup status $vg -$lv1
dmsetup table $vg -$lv1
check lv_field $vg /$lv1 segtype "raid1"
check lv_field $vg /$lv1 stripes 2
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
# Convert 2-way raid1 to mirror
2017-02-07 18:52:04 +03:00
lvconvert --yes --type mirror -R 32K $vg /$lv1
2017-03-20 16:18:50 +03:00
detect_error_leak_
2016-08-09 15:17:26 +03:00
check lv_field $vg /$lv1 segtype "mirror"
check lv_field $vg /$lv1 stripes 2
2017-02-07 18:52:04 +03:00
check lv_field $vg /$lv1 regionsize "32.00k"
2016-08-09 15:17:26 +03:00
aux wait_for_sync $vg $lv1
2017-02-13 00:28:40 +03:00
fsck -fn " $DM_DEV_DIR / $vg / $lv1 "
2016-08-09 15:17:26 +03:00
aux wait_for_sync $vg $lv1
# Clean up
lvremove --yes $vg /$lv1
2016-10-21 19:59:59 +03:00
2016-10-27 12:38:16 +03:00
if [ $correct_raid4_layout -eq 1 ]
then
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
#
# Start out with raid4
#
2016-10-21 19:59:59 +03:00
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
# Create 3-way striped raid4 (4 legs total)
2017-02-13 00:28:40 +03:00
_lvcreate raid4 3 4 8M $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv1
2016-10-21 19:59:59 +03:00
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
# Convert raid4 -> striped
2017-03-01 20:50:35 +03:00
not _lvconvert striped striped 3 3 $vg $lv1 512k
_lvconvert striped striped 3 3 $vg $lv1
2017-02-03 22:39:40 +03:00
2016-10-21 19:59:59 +03:00
# Convert striped -> raid4
2017-03-01 20:50:35 +03:00
_lvconvert raid4 raid4 3 4 $vg $lv1 64k
2017-02-07 18:52:04 +03:00
check lv_field $vg /$lv1 regionsize "64.00k"
2016-08-09 15:17:26 +03:00
2017-02-03 22:39:40 +03:00
# Convert raid4 -> raid5_n
2017-03-01 20:50:35 +03:00
_lvconvert raid5 raid5_n 3 4 $vg $lv1 128k
2017-02-07 18:52:04 +03:00
check lv_field $vg /$lv1 regionsize "128.00k"
2017-02-03 22:39:40 +03:00
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
# Convert raid5_n -> striped
2017-03-01 20:50:35 +03:00
_lvconvert striped striped 3 3 $vg $lv1
2017-02-03 22:39:40 +03:00
# Convert striped -> raid5_n
2017-03-01 20:50:35 +03:00
_lvconvert raid5_n raid5_n 3 4 $vg $lv1
2017-02-03 22:39:40 +03:00
# Convert raid5_n -> raid4
2017-03-01 20:50:35 +03:00
_lvconvert raid4 raid4 3 4 $vg $lv1
2016-10-21 19:59:59 +03:00
2017-02-03 22:39:40 +03:00
# Convert raid4 -> raid0
2017-03-01 20:50:35 +03:00
_lvconvert raid0 raid0 3 3 $vg $lv1
2017-02-03 22:39:40 +03:00
# Convert raid0 -> raid5_n
2017-03-01 20:50:35 +03:00
_lvconvert raid5_n raid5_n 3 4 $vg $lv1
2017-02-03 22:39:40 +03:00
# Convert raid5_n -> raid0_meta
2017-03-01 20:50:35 +03:00
_lvconvert raid0_meta raid0_meta 3 3 $vg $lv1
2017-02-03 22:39:40 +03:00
# Convert raid0_meta -> raid5_n
2017-03-01 20:50:35 +03:00
_lvconvert raid5 raid5_n 3 4 $vg $lv1
2017-02-03 22:39:40 +03:00
2016-08-09 15:17:26 +03:00
# Convert raid4 -> raid0_meta
2017-03-01 20:50:35 +03:00
not _lvconvert raid0_meta raid0_meta 3 3 $vg $lv1 256k
_lvconvert raid0_meta raid0_meta 3 3 $vg $lv1
2016-08-09 15:17:26 +03:00
# Convert raid0_meta -> raid4
2017-03-01 20:50:35 +03:00
_lvconvert raid4 raid4 3 4 $vg $lv1
2016-08-09 15:17:26 +03:00
# Convert raid4 -> raid0
2017-03-01 20:50:35 +03:00
_lvconvert raid0 raid0 3 3 $vg $lv1
2016-08-09 15:17:26 +03:00
# Convert raid0 -> raid4
2017-03-01 20:50:35 +03:00
_lvconvert raid4 raid4 3 4 $vg $lv1
2016-08-09 15:17:26 +03:00
2016-10-21 19:59:59 +03:00
# Convert raid4 -> striped
2017-03-01 20:50:35 +03:00
_lvconvert striped striped 3 3 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert striped -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6_n_6 raid6_n_6 3 5 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid6_n_6 -> striped
2017-03-01 20:50:35 +03:00
_lvconvert striped striped 3 3 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert striped -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6 raid6_n_6 3 5 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid6_n_6 -> raid5_n
2017-03-01 20:50:35 +03:00
_lvconvert raid5_n raid5_n 3 4 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid5_n -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6_n_6 raid6_n_6 3 5 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid6_n_6 -> raid4
2017-03-01 20:50:35 +03:00
_lvconvert raid4 raid4 3 4 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid4 -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6 raid6_n_6 3 5 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid6_n_6 -> raid0
2017-03-01 20:50:35 +03:00
_lvconvert raid0 raid0 3 3 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid0 -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6_n_6 raid6_n_6 3 5 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid6_n_6 -> raid0_meta
2017-03-01 20:50:35 +03:00
_lvconvert raid0_meta raid0_meta 3 3 $vg $lv1
2017-02-04 03:40:58 +03:00
# Convert raid0_meta -> raid6_n_6
2017-03-01 20:50:35 +03:00
_lvconvert raid6 raid6_n_6 3 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
2017-02-10 21:10:05 +03:00
# Convert raid6_n_6 -> striped
2017-03-01 20:50:35 +03:00
not _lvconvert striped striped 3 3 $vg $lv1 128k
_lvconvert striped striped 3 3 $vg $lv1
2017-02-10 21:10:05 +03:00
# Convert striped -> raid10
2017-03-01 20:50:35 +03:00
_lvconvert raid10 raid10 3 6 $vg $lv1
2017-02-10 21:10:05 +03:00
# Convert raid10 -> raid0
2017-03-01 20:50:35 +03:00
not _lvconvert raid0 raid0 3 3 $vg $lv1 64k
_lvconvert raid0 raid0 3 3 $vg $lv1
2017-02-10 21:10:05 +03:00
# Convert raid0 -> raid10
2017-03-01 20:50:35 +03:00
_lvconvert raid10 raid10 3 6 $vg $lv1
2017-02-10 21:10:05 +03:00
2017-02-24 06:36:03 +03:00
# Convert raid10 -> raid0_meta
2017-03-01 20:50:35 +03:00
_lvconvert raid0_meta raid0_meta 3 3 $vg $lv1
2017-02-24 06:36:03 +03:00
# Convert raid0_meta -> raid5
2017-03-01 20:50:35 +03:00
_lvconvert raid5_n raid5_n 3 4 $vg $lv1
2017-02-24 06:36:03 +03:00
# Convert raid5_n -> raid0_meta
2017-03-01 20:50:35 +03:00
_lvconvert raid0_meta raid0_meta 3 3 $vg $lv1
2017-02-10 21:10:05 +03:00
# Convert raid0_meta -> raid10
2017-03-01 20:50:35 +03:00
_lvconvert raid10 raid10 3 6 $vg $lv1
2017-02-10 21:10:05 +03:00
# Convert raid10 -> striped
2017-03-01 20:50:35 +03:00
not _lvconvert striped striped 3 3 $vg $lv1 256k
_lvconvert striped striped 3 3 $vg $lv1
2017-02-10 21:10:05 +03:00
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
# Clean up
lvremove -y $vg
# Create + convert 4-way raid5 variations
2017-02-13 00:28:40 +03:00
_lvcreate raid5 4 5 8M $vg $lv1
2017-02-04 03:40:58 +03:00
aux wait_for_sync $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
_invalid_raid5_conversions $vg $lv1
2017-03-01 20:50:35 +03:00
not _lvconvert raid6_rs_6 raid6_rs_6 4 6 $vg $lv1
not _lvconvert raid6_la_6 raid6_la_6 4 6 $vg $lv1
not _lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
_lvconvert raid6_ls_6 raid6_ls_6 4 6 $vg $lv1
_lvconvert raid5_ls raid5_ls 4 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
lvremove -y $vg
2017-02-13 00:28:40 +03:00
_lvcreate raid5_ls 4 5 8M $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv1
_invalid_raid5_conversions $vg $lv1
2017-03-01 20:50:35 +03:00
not _lvconvert raid6_rs_6 raid6_rs_6 4 6 $vg $lv1
not _lvconvert raid6_la_6 raid6_la_6 4 6 $vg $lv1
not _lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
_lvconvert raid6_ls_6 raid6_ls_6 4 6 $vg $lv1
_lvconvert raid5_ls raid5_ls 4 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
lvremove -y $vg
2017-02-13 00:28:40 +03:00
_lvcreate raid5_rs 4 5 8M $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv1
_invalid_raid5_conversions $vg $lv1
2017-03-01 20:50:35 +03:00
not _lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
not _lvconvert raid6_la_6 raid6_la_6 4 6 $vg $lv1
not _lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
_lvconvert raid6_rs_6 raid6_rs_6 4 6 $vg $lv1
_lvconvert raid5_rs raid5_rs 4 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
lvremove -y $vg
2017-02-13 00:28:40 +03:00
_lvcreate raid5_la 4 5 8M $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv1
_invalid_raid5_conversions $vg $lv1
2017-03-01 20:50:35 +03:00
not _lvconvert raid6_ls_6 raid6_ls_6 4 6 $vg $lv1
not _lvconvert raid6_rs_6 raid6_rs_6 4 6 $vg $lv1
not _lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
_lvconvert raid6_la_6 raid6_la_6 4 6 $vg $lv1
_lvconvert raid5_la raid5_la 4 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
lvremove -y $vg
2017-02-13 00:28:40 +03:00
_lvcreate raid5_ra 4 5 8M $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
aux wait_for_sync $vg $lv1
_invalid_raid5_conversions $vg $lv1
2017-03-01 20:50:35 +03:00
not _lvconvert raid6_ls_6 raid6_ls_6 4 6 $vg $lv1
not _lvconvert raid6_rs_6 raid6_rs_6 4 6 $vg $lv1
not _lvconvert raid6_la_6 raid6_la_6 4 6 $vg $lv1
_lvconvert raid6_ra_6 raid6_ra_6 4 6 $vg $lv1
_lvconvert raid5_ra raid5_ra 4 5 $vg $lv1
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Add:
- support for segment types raid6_{ls,rs,la,ra}_6
(striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
out _lvcreate,_lvconvert funxtions
Related: rhbz1366296
2017-02-05 02:53:36 +03:00
lvremove -y $vg
2017-02-04 03:40:58 +03:00
2016-10-27 12:38:16 +03:00
else
2017-02-13 00:28:40 +03:00
not lvcreate -y -aey --type raid4 -i 3 -L8M -n $lv4 $vg
2016-10-27 12:38:16 +03:00
not lvconvert -y --ty raid4 $vg /$lv1
not lvconvert -y --ty raid4 $vg /$lv2
fi
2016-08-09 15:17:26 +03:00
vgremove -ff $vg