1*7c604eeaShaad#!/bin/bash 2*7c604eeaShaad# Copyright (C) 2008 Red Hat, Inc. All rights reserved. 3*7c604eeaShaad# 4*7c604eeaShaad# This copyrighted material is made available to anyone wishing to use, 5*7c604eeaShaad# modify, copy, or redistribute it subject to the terms and conditions 6*7c604eeaShaad# of the GNU General Public License v.2. 7*7c604eeaShaad# 8*7c604eeaShaad# You should have received a copy of the GNU General Public License 9*7c604eeaShaad# along with this program; if not, write to the Free Software Foundation, 10*7c604eeaShaad# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 11*7c604eeaShaad 12*7c604eeaShaad. ./test-utils.sh 13*7c604eeaShaad 14*7c604eeaShaadprepare_vg 4 15*7c604eeaShaad 16*7c604eeaShaadvgreduce $vg $dev4 17*7c604eeaShaadlvcreate -m 1 -L 1 -n mirror $vg 18*7c604eeaShaad 19*7c604eeaShaadlvchange -a n $vg/mirror 20*7c604eeaShaadvgextend $vg $dev4 21*7c604eeaShaaddisable_dev $dev1 22*7c604eeaShaadlvchange --partial -a y $vg/mirror 23*7c604eeaShaad 24*7c604eeaShaadnot vgreduce -v --removemissing $vg 25*7c604eeaShaadlvconvert -y -i 1 --repair $vg/mirror 26*7c604eeaShaadvgreduce --removemissing $vg 27*7c604eeaShaad 28*7c604eeaShaadenable_dev $dev1 29*7c604eeaShaadvgextend $vg $dev1 30*7c604eeaShaaddisable_dev $dev2 31*7c604eeaShaadlvconvert -y -i 1 --repair $vg/mirror 32*7c604eeaShaadvgreduce --removemissing $vg 33*7c604eeaShaad 34*7c604eeaShaadenable_dev $dev2 35*7c604eeaShaadvgextend $vg $dev2 36*7c604eeaShaaddisable_dev $dev3 37*7c604eeaShaadlvconvert -y -i 1 --repair $vg/mirror 38*7c604eeaShaadvgreduce --removemissing $vg 39*7c604eeaShaad 40*7c604eeaShaadenable_dev $dev3 41*7c604eeaShaadvgextend $vg $dev3 42*7c604eeaShaadlvcreate -m 2 -l 1 -n mirror2 $vg $dev1 $dev2 $dev3 $dev4 43*7c604eeaShaadvgchange -a n $vg 44*7c604eeaShaadpvremove -ff -y $dev4 45*7c604eeaShaadecho 'y' | not lvconvert -y -i 1 --repair $vg/mirror2 46*7c604eeaShaadvgs 47