mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
test: add lvcreate-raid-volume_list
Test that no (Sub)LV remnants persist if the volume group is not listed in configuration variable activation/volume_list, hence not activatable thus causing initialization of rmeta SubLVs to fail. Related: rhbz1161347
This commit is contained in:
parent
3a48fb47b7
commit
bc286910ec
@ -1,5 +1,6 @@
|
||||
Version 2.02.178 -
|
||||
=====================================
|
||||
Add test for activation/volume_list (Sub)LV remnants.
|
||||
Disallow usage of cache format 2 with mq cache policy.
|
||||
Again accept striped LV as COW LV with lvconvert -s (2.02.169).
|
||||
Fix raid target version testing for supported features.
|
||||
|
42
test/shell/lvcreate-raid-volume_list.sh
Normal file
42
test/shell/lvcreate-raid-volume_list.sh
Normal file
@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2018 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SKIP_WITH_LVMLOCKD=1
|
||||
SKIP_WITH_LVMPOLLD=1
|
||||
|
||||
# bz1161347 - When raid creation is aborted, left-over devices appear
|
||||
|
||||
. lib/inittest
|
||||
|
||||
########################################################
|
||||
# MAIN
|
||||
########################################################
|
||||
aux have_raid 1 3 0 || skip
|
||||
|
||||
aux prepare_pvs 2 # 2 devices for RAID1
|
||||
get_devs
|
||||
vgcreate -s 512k "$vg" "${DEVICES[@]}"
|
||||
|
||||
aux lvmconf "activation/volume_list = [ \"vg_not_exist\" ]"
|
||||
|
||||
##########################################################
|
||||
# Create 2-way raid1 which fails due to $vg not listed on
|
||||
# activation/volume_list. Check for any (Sub)LV remnants.
|
||||
##########################################################
|
||||
not lvcreate --yes --type raid1 -l 2 -n $lv $vg
|
||||
check lv_not_exists $vg/${lv}_rmeta_0
|
||||
check lv_not_exists $vg/${lv}_rmeta_1
|
||||
check lv_not_exists $vg/${lv}_rimage_0
|
||||
check lv_not_exists $vg/${lv}_rimage_1
|
||||
check lv_not_exists $vg/$lv
|
||||
|
||||
vgremove -ff $vg
|
Loading…
Reference in New Issue
Block a user