1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
lvm2/tools
Mike Snitzer 3e5a54a791 lvconvert --merge @tag support
Switch lvconvert's --merge code over to using process_each_lv().  Doing
so adds support for a single 'lvconvert --merge' to start merging
multiple LVs (which includes @tag expansion).

Add 'lvconvert --merge @tag' testing to test/t-snapshot-merge.sh

Adjust man/lvconvert.8.in to reflect these expanded capabilities.

The lvconvert.c implementation requires rereading the VG each iteration
of process_each_lv().  Otherwise a stale VG instance associated with
the LV passed to lvconvert_single_merge() would result in stale VG
metadata being written back out to disk.  This overwrote new metadata
that was written when a previous snapshot LV finished merging (via
lvconvert_poll).  This is only an issue when merging multiple LVs that
share the same VG (a single VG is typical for most LVM configurations on
system disks).

In the end this new support is very useful for performing a "system
rollback" that requires multiple snapshot LVs be merged to their
respective origin LV.

The yum-utils 'fs-snapshot' plugin tags all snapshot LVs that it creates
with a common 'snapshot_tag' that is unique to the yum transaction.
Rolling back a yum transaction, that created LVM snapshots with the tag
'yum_20100129133223', is as simple as:
  lvconvert --merge @yum_20100129133223

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2010-02-05 22:44:37 +00:00
..
.exported_symbols .export.sym generation 2004-03-26 14:51:23 +00:00
args.h Add --merge support to lvconvert to start merging a snapshot into its 2010-01-13 01:45:15 +00:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option 2010-02-03 03:58:08 +00:00
dmsetup.c Cleanup gcc warning: cast discards qualifiers from pointer target type 2010-01-14 10:15:23 +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 lvconvert --merge @tag support 2010-02-05 22:44:37 +00:00
lvcreate.c Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option 2010-02-03 03:58:08 +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 Only allow one return from poll_daemon(). If a child polldaemon was 2010-01-11 19:19:17 +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 Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option 2010-02-03 03:58:08 +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 %ORIGIN support to lv{create,extend,reduce,resize} --extents option 2010-02-03 03:58:08 +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 fixes 2010-01-19 01:10:46 +00:00
polldaemon.c Default to checking LV's progress before waiting in _wait_for_single_lv. 2010-01-22 21:59:42 +00:00
polldaemon.h Default to checking LV's progress before waiting in _wait_for_single_lv. 2010-01-22 21:59:42 +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 Prepare for _get_lvconvert_vg() reuse as part of a larger lvconvert.c 2010-02-05 22:40:49 +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 This is related to liblvm and its lvm_list_vg_names() and lvm_list_vg_uuids() functions 2010-02-03 14:08:39 +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 Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option 2010-02-03 03:58:08 +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 Rename segment and lv status flag from SNAPSHOT_MERGE to MERGING. 2010-01-13 01:56:18 +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 This is related to liblvm and its lvm_list_vg_names() and lvm_list_vg_uuids() functions 2010-02-03 14:08:39 +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