1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/test
Jonathan Earl Brassow a391248427 Fix vgsplit when there are mirrors that have mirrored logs.
The problem as reported by "ben <benscott@nwlink.com>" on lvm-devel:

vgsplit fails with mirrored mirror log

#lvs --all -o lv_name,lv_attr,devices
LV                       Attr   Devices
MyMirror                 mwi--
[MyMirror_mimage_0]      Iwi--- /dev/sdq(0)
[MyMirror_mimage_1]      Iwi--- /dev/sdo(0)
[MyMirror_mimage_2]      Iwi--- /dev/sdi(0)
[MyMirror_mlog]          mwi---
[MyMirror_mlog_mimage_0] Iwi--- /dev/sds(0)
[MyMirror_mlog_mimage_1] Iwi--- /dev/sde(0)

#vgsplit -v "TestA" "TestB" "/dev/sdq" "/dev/sdo" "/dev/sdi" "/dev/sds"
"/dev/sde"
  Checking for volume group "TestA"
  Checking for new volume group "TestB"
  Archiving volume group "TestA" metadata (seqno 213).
Can't split mirror MyMirror between two Volume Groups

AFTER FIX:

[root@bp-01 ~]# lvs -a -o name,vg_name,devices vg new
  Volume group "new" not found
  Skipping volume group new
  LV                 VG   Devices
  lv                 vg   lv_mimage_0(0),lv_mimage_1(0)
  [lv_mimage_0]      vg   /dev/sdb1(0)
  [lv_mimage_1]      vg   /dev/sdc1(0)
  [lv_mlog]          vg   lv_mlog_mimage_0(0),lv_mlog_mimage_1(0)
  [lv_mlog_mimage_0] vg   /dev/sdh1(0)
  [lv_mlog_mimage_1] vg   /dev/sdi1(0)
[root@bp-01 ~]# vgsplit vg new /dev/sd[bchi]1
  New volume group "new" successfully split from "vg"
[root@bp-01 ~]# lvs -a -o name,vg_name,devices vg new
  LV                 VG   Devices
  lv                 new  lv_mimage_0(0),lv_mimage_1(0)
  [lv_mimage_0]      new  /dev/sdb1(0)
  [lv_mimage_1]      new  /dev/sdc1(0)
  [lv_mlog]          new  lv_mlog_mimage_0(0),lv_mlog_mimage_1(0)
  [lv_mlog_mimage_0] new  /dev/sdh1(0)
  [lv_mlog_mimage_1] new  /dev/sdi1(0)
2011-10-06 14:17:45 +00:00
..
api Another vgremove for speedup 2011-09-19 18:40:51 +00:00
lib Allow overwrite for VERIFY_UDEV 2011-09-24 21:15:13 +00:00
.gitignore Add testing framework, along with first few tests. 2007-09-18 14:00:42 +00:00
Makefile.in Improvements 2011-09-24 21:10:19 +00:00
t-000-basic.sh Detect unusable nodes on fs 2011-09-24 20:54:35 +00:00
t-activate-missing.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-activate-partial.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-clvmd-restart.sh Let the utils to prepare PVs 2011-09-29 08:58:27 +00:00
t-covercmd.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-dmeventd-restart.sh Test speed up 2011-09-19 12:49:14 +00:00
t-fsadm.sh Add missing log_error() to lvresize command when fsadm tool fails 2011-09-21 10:39:47 +00:00
t-inconsistent-metadata.sh Lower disk space usage of inconsistent mda test 2011-01-28 16:13:39 +00:00
t-listings.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lock-blocking.sh Make the lock test a little bit better... 2011-03-04 15:04:08 +00:00
t-lvchange-mirror.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvconvert-mirror-basic-0.sh add copyright notices to new files 2010-07-28 12:20:38 +00:00
t-lvconvert-mirror-basic-1.sh add copyright notices to new files 2010-07-28 12:20:38 +00:00
t-lvconvert-mirror-basic-2.sh add copyright notices to new files 2010-07-28 12:20:38 +00:00
t-lvconvert-mirror-basic-3.sh add copyright notices to new files 2010-07-28 12:20:38 +00:00
t-lvconvert-mirror-basic.sh Do not echo y to lvconvert 2011-03-03 12:30:33 +00:00
t-lvconvert-mirror.sh Fail allocation if number of extents not divisible by area count 2011-06-23 10:53:24 +00:00
t-lvconvert-raid.sh Move RAID convert tests to new file, t-lvconvert-raid.sh 2011-08-18 19:56:17 +00:00
t-lvconvert-repair-dmeventd.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvconvert-repair-policy.sh Make the mirror log checks in t-lvconvert-repair-policy a bit more strict 2011-04-12 12:39:24 +00:00
t-lvconvert-repair-replace.sh Use backward compatible configuration for test 2011-02-28 19:44:21 +00:00
t-lvconvert-repair-snapshot.sh Use backward compatible configuration for test 2011-02-28 19:44:21 +00:00
t-lvconvert-repair-transient-dmeventd.sh Fix RHBZ 651590 (failure to lock LV results in failure to repair mirror after 2011-06-15 17:45:02 +00:00
t-lvconvert-repair-transient.sh Re-enable t-lvconvert-repair-transient, avoiding the deadlock by running mkfs 2011-01-05 14:15:01 +00:00
t-lvconvert-repair.sh Use backward compatible configuration for test 2011-02-28 19:44:21 +00:00
t-lvconvert-twostep.sh Add disk to mirrored log type conversion. 2011-01-11 17:05:08 +00:00
t-lvcreate-large.sh Disable t-lvcreate-large.sh for now with cluster. 2011-09-16 14:32:47 +00:00
t-lvcreate-mirror.sh Use backward compatible configuration for test 2011-02-28 19:44:21 +00:00
t-lvcreate-operation.sh Add simple test for read-only table reload suppression 2011-07-25 08:41:52 +00:00
t-lvcreate-pvtags.sh Remove vg at the test's end 2011-09-16 11:52:33 +00:00
t-lvcreate-raid.sh Move RAID convert tests to new file, t-lvconvert-raid.sh 2011-08-18 19:56:17 +00:00
t-lvcreate-repair.sh Better version of failing 'should' test 2011-07-18 12:12:41 +00:00
t-lvcreate-small-snap.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvcreate-striped-mirror.sh Fix the divisibility check in the allocator for the mirror+stripe case (require 2011-09-16 09:59:42 +00:00
t-lvcreate-thin.sh Add inital thin testing 2011-09-16 12:23:59 +00:00
t-lvcreate-usage.sh More readahead tests. 2011-06-28 09:43:28 +00:00
t-lvextend-percent-extents.sh Fix extent rounding for striped segments. 2011-06-09 19:34:49 +00:00
t-lvextend-snapshot-dmeventd.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvextend-snapshot-policy.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvm-init.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvmcache-exercise.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvresize-mirror.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-lvresize-rounding.sh When resizing LVs, always round in the safe direction, regardless of whether we 2011-09-15 18:51:11 +00:00
t-lvresize-usage.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-mdata-strings.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-metadata-balance.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-metadata-dirs.sh Add a test for RHBZ 640621 (metadata/dirs + no PV MDAs broken). 2011-01-05 01:00:34 +00:00
t-metadata.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-mirror-names.sh Testing: remove -q from grep 2011-03-30 13:39:24 +00:00
t-mirror-vgreduce-removemissing.sh Rewrite vgreduce --removemissing --force, using existing primitives: 2011-05-07 15:52:16 +00:00
t-nomda-missing.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-pool-labels.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-pv-duplicate.sh Fix use of released vgname and vgid 2011-04-21 13:13:40 +00:00
t-pv-min-size.sh Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
t-pv-range-overflow.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-pvchange-usage.sh update pv_attr check for new missing attr 2011-06-30 19:32:51 +00:00
t-pvcreate-metadata0.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-pvcreate-operation-md.sh Fix kernel version parsing in tests, use common function. 2011-06-09 18:58:00 +00:00
t-pvcreate-operation.sh Testing: remove -q from grep 2011-03-30 13:39:24 +00:00
t-pvcreate-usage.sh Fix test for 8k page (fails on Sparc architecture). 2011-03-06 18:28:09 +00:00
t-pvmove-basic.sh Lower device size of pvmove test 2011-01-28 16:15:08 +00:00
t-pvremove-usage.sh Fix test, "echo n" is not needed when -y is specified. 2011-03-03 14:16:08 +00:00
t-read-ahead.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-snapshot-autoumount-dmeventd.sh Fix test to use explicit /dev/mapper/ node, /proc/mounts should not change this... 2011-03-02 13:49:29 +00:00
t-snapshot-merge.sh Testing: remove -q from grep 2011-03-30 13:39:24 +00:00
t-snapshots-of-mirrors.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-tags.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-test-partition.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-topology-support.sh Fix topology test. 2011-06-09 14:26:47 +00:00
t-unknown-segment.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-unlost-pv.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgcfgbackup-usage.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgchange-maxlv.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgchange-sysinit.sh Skip sysinit test for cluster 2011-01-31 22:05:30 +00:00
t-vgchange-usage.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgcreate-usage.sh Testing: remove -q from grep 2011-03-30 13:39:24 +00:00
t-vgextend-restoremissing.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgextend-usage.sh Testing: remove -q from grep 2011-03-30 13:39:24 +00:00
t-vgimportclone.sh Replace char class :space: with explicit chars 2011-09-07 08:31:16 +00:00
t-vgmerge-operation.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgmerge-usage.sh Reduce amount of vgremove and vgchange calls 2011-03-28 11:35:20 +00:00
t-vgreduce-removemissing-snapshot.sh Rewrite vgreduce --removemissing --force, using existing primitives: 2011-05-07 15:52:16 +00:00
t-vgreduce-usage.sh Fix t-vgreduce-usage to stop relying on the persistent cache not seeing a 2011-07-11 12:13:07 +00:00
t-vgrename-usage.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgsplit-operation.sh Fix vgsplit when there are mirrors that have mirrored logs. 2011-10-06 14:17:45 +00:00
t-vgsplit-stacked.sh Substantial rework of the functional test support code. Some new features: 2011-01-05 00:16:18 +00:00
t-vgsplit-usage.sh Reduce amount of vgremove and vgchange calls 2011-03-28 11:35:20 +00:00