1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
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
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
args.h lvcreate parsing for thin provisioning. 2011-09-06 00:26:42 +00:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h lvcreate parsing for thin provisioning. 2011-09-06 00:26:42 +00:00
dmsetup.c Add --retry option for dmsetup remove to retry removal if not successful. 2011-09-22 17:12:28 +00:00
dumpconfig.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
formats.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c Remove incorrect requirement for -j or -m from lvchange error message. 2011-09-05 12:54:29 +00:00
lvconvert.c Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
lvcreate.c better -m0 error message, but there's an internal logic error to fix instead 2011-09-27 12:37:07 +00:00
lvdisplay.c Rework the toollib interface (process_each_*) on top of new vg_read. 2009-07-01 17:00:50 +00:00
lvextend.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvm2cmd-static.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvm2cmd.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm2cmd.h Remove C++ private keyword from headers. 2010-06-16 13:01:25 +00:00
lvm2cmdline.h Support repetition of --addtag and --deltag arguments. 2010-11-11 17:29:05 +00:00
lvm-static.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm.c Support repetition of --addtag and --deltag arguments. 2010-11-11 17:29:05 +00:00
lvmchange.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvmcmdlib.c mlockall() -> mlock() 2010-03-05 14:48:33 +00:00
lvmcmdline.c Fix command line option decoding 2011-09-16 12:10:02 +00:00
lvmdiskscan.c Use new dev_open_readonly fn to prevent opening devices for read-write when not necessary. 2011-05-28 09:48:14 +00:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvrename.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
lvresize.c Add missing log_error() to lvresize command when fsadm tool fails 2011-09-21 10:39:47 +00:00
lvscan.c Do not check for open_count when not needed. 2011-02-03 01:24:46 +00:00
Makefile.in Drop cleanup of .exported_symbols_generated in DISTCLEAN_TARGETS 2011-09-24 21:00:52 +00:00
polldaemon.c Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
polldaemon.h Start using 64-bit status flags - most of the code already handles them. 2011-09-06 18:49:31 +00:00
pvchange.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvck.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvcreate.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvdisplay.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvmove.c Introduce revert_lv for better pvmove cleanup. 2011-09-27 22:43:40 +00:00
pvremove.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvresize.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvscan.c Add new free_pv_fid fn and use it throughout to free all attached fids. 2011-03-11 14:56:56 +00:00
reporter.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
segtypes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
stub.h Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
toollib.c Fix possible overflow of size if %FREE or %VG is used. 2011-09-15 15:26:40 +00:00
toollib.h Const fixing 2011-02-18 14:47:28 +00:00
tools.h Fix possible overflow of size if %FREE or %VG is used. 2011-09-15 15:26:40 +00:00
vgcfgbackup.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgcfgrestore.c Const fixing 2011-02-18 14:47:28 +00:00
vgchange.c Fix vgchange activation of snapshot with virtual origin. 2011-09-14 18:20:03 +00:00
vgck.c Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
vgconvert.c Add new free_pv_fid fn and use it throughout to free all attached fids. 2011-03-11 14:56:56 +00:00
vgcreate.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgdisplay.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgexport.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgextend.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgimport.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgmerge.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgmknodes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgreduce.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgremove.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgrename.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
vgscan.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
vgsplit.c Fix vgsplit when there are mirrors that have mirrored logs. 2011-10-06 14:17:45 +00:00