1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
lvm2/tools
Jonathan Earl Brassow d5a3de5a97 This patch adds the capability to split off a mirror legs.
It is pretty much the same as reducing the number of
mirror legs, but we just don't delete them afterwards.

The following command line interface is enforced:
  prompt> lvconvert --splitmirror <n> -n <name> <VG>/<LV>
where 'n' is the number of images to split off, and
where 'name' is the name of the newly split off logical volume.

If more than one leg is split off, a new mirror will be the
result.  The newly split off mirror will have a 'core' log.
Example:
[root@bp-01 LVM2]# !lvs
lvs -a -o name,copy_percent,devices
  LV            Copy%  Devices
  lv            100.00 lv_mimage_0(0),lv_mimage_1(0),lv_mimage_2(0),lv_mimage_3(0)
  [lv_mimage_0]        /dev/sdb1(0)
  [lv_mimage_1]        /dev/sdc1(0)
  [lv_mimage_2]        /dev/sdd1(0)
  [lv_mimage_3]        /dev/sde1(0)
  [lv_mlog]            /dev/sdi1(0)
[root@bp-01 LVM2]# lvconvert --splitmirrors 2 --name split vg/lv /dev/sd[ce]1
  Logical volume lv converted.
[root@bp-01 LVM2]# !lvs
lvs -a -o name,copy_percent,devices
  LV               Copy%  Devices
  lv               100.00 lv_mimage_0(0),lv_mimage_2(0)
  [lv_mimage_0]           /dev/sdb1(0)
  [lv_mimage_2]           /dev/sdd1(0)
  [lv_mlog]               /dev/sdi1(0)
  split            100.00 split_mimage_0(0),split_mimage_1(0)
  [split_mimage_0]        /dev/sde1(0)
  [split_mimage_1]        /dev/sdc1(0)

It can be seen that '--splitmirror <n>' is exactly the same
as '--mirrors -<n>' (note the minus sign), except there is the
additional notion to keep the image being detached from the
mirror instead of just throwing it away.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-08 22:00:31 +00:00
..
.exported_symbols .export.sym generation 2004-03-26 14:51:23 +00:00
args.h This patch adds the capability to split off a mirror legs. 2010-01-08 22:00:31 +00:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h This patch adds the capability to split off a mirror legs. 2010-01-08 22:00:31 +00:00
dmsetup.c Add --noudevrules option for dmsetup to disable /dev node management by udev. 2010-01-07 19:45:12 +00:00
dumpconfig.c Tidy some uses of arg_count and introduce arg_is_set. 2009-11-03 15:50:42 +00:00
formats.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvchange.c . update documentation for --poll in the vgchange and lvchange man pages 2010-01-06 19:08:58 +00:00
lvconvert.c This patch adds the capability to split off a mirror legs. 2010-01-08 22:00:31 +00:00
lvcreate.c Fix setting of readahead in lvcreate. 2009-12-03 01:47:33 +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 Fix mirror log name construction during lvconvert. (2.02.30) 2008-01-31 12:19:36 +00:00
lvm2cmd.h Fix log fn prototype. 2009-09-26 00:29:13 +00:00
lvm2cmdline.h lvm2cmdline.h:31: warning: declaration of `is_static' shadows a global declaration 2008-12-19 18:51:02 +00:00
lvm-static.c Use tools.h in for lvm-static. 2009-01-20 20:37:41 +00:00
lvm.c #define an INTERNAL_ERROR macro and use it throughout LVM. 2009-12-16 19:22:11 +00:00
lvmchange.c Fix tools to report error when stopped by user. 2009-12-03 19:18:33 +00:00
lvmcmdlib.c Cleanup returns for void functions. 2009-12-11 13:16:37 +00:00
lvmcmdline.c #define an INTERNAL_ERROR macro and use it throughout LVM. 2009-12-16 19:22:11 +00:00
lvmdiskscan.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
lvrename.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
lvresize.c Add missing 'stack;' for all suspend_lv and resume_lv callers. 2010-01-05 21:07:31 +00:00
lvscan.c Introduce percent_range_t and centralise snapshot full/mirror in-sync checks. 2009-10-01 00:35:29 +00:00
Makefile.in More build cleanups (linker parameter ordering). 2009-10-13 01:31:10 +00:00
polldaemon.c Change background polldaemon's process name to "(lvm2)". 2010-01-08 21:53:07 +00:00
polldaemon.h Make poll_mirror_progress a function that can be replaced. 2009-09-30 18:15:06 +00:00
pvchange.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
pvck.c Clean up numerous compiler warnings that crept in recently. 2007-08-22 14:38:18 +00:00
pvcreate.c Rename pvcreate_params processing functions to better match <object><action>. 2009-11-01 19:51:54 +00:00
pvdisplay.c Add missing vg_release to pvs and pvdisplay to fix memory leak. 2009-11-24 17:07:09 +00:00
pvmove.c Add missing 'stack;' for all activate_lv and deactivate_lv callers. 2010-01-05 21:08:34 +00:00
pvremove.c Fix tools to report error when stopped by user. 2009-12-03 19:18:33 +00:00
pvresize.c Fix unlocking vg in some pvresize and toollib error paths. 2009-12-11 13:11:56 +00:00
pvscan.c Cleanup returns for void functions. 2009-12-11 13:16:37 +00:00
reporter.c Add missing vg_release to pvs and pvdisplay to fix memory leak. 2009-11-24 17:07:09 +00:00
segtypes.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
stub.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
toollib.c Add missing 'stack;' for all suspend_lv and resume_lv callers. 2010-01-05 21:07:31 +00:00
toollib.h Rename fill_vg_create_params to vgcreate_params_set_from_args. 2009-11-01 20:03:24 +00:00
tools.h Tidy some uses of arg_count and introduce arg_is_set. 2009-11-03 15:50:42 +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 Handle metadata with unknown segment types more gracefully. 2009-10-16 17:41:49 +00:00
vgchange.c . update documentation for --poll in the vgchange and lvchange man pages 2010-01-06 19:08:58 +00:00
vgck.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgconvert.c Add --pvmetadatacopies as a synonym for --metadatacopies in various commands. 2009-10-05 20:55:56 +00:00
vgcreate.c Fix previous vgcreate commit to not call unpaired unlock. 2009-12-28 18:34:45 +00:00
vgdisplay.c Document --all option in man pages, cleanup {pv|vg|lv}{s|display} man pages. 2009-10-26 14:37:09 +00:00
vgexport.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgextend.c Rename pvcreate_params processing functions to better match <object><action>. 2009-11-01 19:51:54 +00:00
vgimport.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgmerge.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
vgmknodes.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
vgreduce.c Also clean up MISSING devices in --removemissing --force in vgreduce. 2009-12-17 13:54:46 +00:00
vgremove.c Allow vgremove of a VG with PVs missing. 2010-01-08 14:03:54 +00:00
vgrename.c Add lots of missing stack debug messages to tools. 2009-09-14 22:47:49 +00:00
vgscan.c Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING. 2009-09-15 01:38:59 +00:00
vgsplit.c Rename validate_vg_create_params to vgcreate_params_validate. 2009-11-01 20:05:17 +00:00