Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / lvm2 / dist / test / t-unknown-segment.sh
blob74a2710d257b464d8e0ade0459c57621c5217f9d
1 #!/bin/sh
2 # Copyright (C) 2009 Red Hat, Inc. All rights reserved.
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU General Public License v.2.
8 # You should have received a copy of the GNU General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12 . ./test-utils.sh
14 aux prepare_vg 4
16 lvcreate -l 1 -n $lv1 $vg
17 lvcreate -l 2 -m 1 -n $lv2 $vg
19 vgcfgbackup -f bak0 $vg
20 sed -e 's,striped,unstriped,;s,mirror,unmirror,' -i.orig bak0
21 vgcfgrestore -f bak0 $vg
23 # we have on-disk metadata with unknown segments now
24 not lvchange -a y $vg/$lv1 # check that activation is refused
26 vgcfgbackup -f bak1 $vg
27 cat bak1
28 sed -e 's,unstriped,striped,;s,unmirror,mirror,' -i.orig bak1
29 vgcfgrestore -f bak1 $vg
30 vgcfgbackup -f bak2 $vg
32 egrep -v 'description|seqno|creation_time|Generated' < bak0.orig > a
33 egrep -v 'description|seqno|creation_time|Generated' < bak2 > b
34 diff -u a b