1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/tools
Jonathan Earl Brassow 6d04311efa Add the ability to split an image from the mirror and track changes.
~> lvconvert --splitmirrors 1 --trackchanges vg/lv
The '--trackchanges' option allows a user the ability to use an image of
a RAID1 array for the purposes of temporary read-only access.  The image
can be merged back into the array at a later time and only the blocks that
have changed in the array since the split will be resync'ed.  This
operation can be thought of as a partial split.  The image is never completely
extracted from the array, in that the array reserves the position the device
occupied and tracks the differences between the array and the split image via
a bitmap.  The image itself is rendered read-only and the name (<LV>_rimage_*)
cannot be changed.  The user can complete the split (permanently splitting the
image from the array) by re-issuing the 'lvconvert' command without the
'--trackchanges' argument and specifying the '--name' argument.
	~> lvconvert --splitmirrors 1 --name my_split vg/lv
Merging the tracked image back into the array is done with the '--merge'
option (included in a follow-on patch).
	~> lvconvert --merge vg/lv_rimage_<n>

The internal mechanics of this are relatively simple.  The 'raid' device-
mapper target allows for the specification of an empty slot in an array
via '- -'.  This is what will be used if a partial activation of an array
is ever required.  (It would also be possible to use 'error' targets in
place of the '- -'.)  If a RAID image is found to be both read-only and
visible, then it is considered separate from the array and '- -' is used
to hold it's position in the array.  So, all that needs to be done to
temporarily split an image from the array /and/ cause the kernel target's
bitmap to track (aka "mark") changes made is to make the specified image
visible and read-only.  To merge the device back into the array, the image
needs to be returned to the read/write state of the top-level LV and made
invisible.
2011-08-18 19:38:26 +00:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
args.h Add the ability to split an image from the mirror and track changes. 2011-08-18 19:38:26 +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 the ability to split an image from the mirror and track changes. 2011-08-18 19:38:26 +00:00
dmsetup.c pre-release fixes incl make distclean and configure --with-raid=none/shared 2011-08-11 19:18:17 +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 Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c s/MIRROR_NOTSYNCED/LV_NOTSYNCED/ - Flag will may refer to more than just mirrors 2011-03-29 12:51:57 +00:00
lvconvert.c Add the ability to split an image from the mirror and track changes. 2011-08-18 19:38:26 +00:00
lvcreate.c more pre-release fixes 2011-08-12 02:16:46 +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 Add 'empty' command 2011-08-04 14:54:48 +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 Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
lvscan.c Do not check for open_count when not needed. 2011-02-03 01:24:46 +00:00
Makefile.in Fix linking order for liblvm2cmd 2010-10-15 09:41:21 +00:00
polldaemon.c Replace free_vg with release_vg 2011-08-10 20:25:29 +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 Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvck.c Add escape sequence for ':' and '@' found in device names used as PVs. 2010-09-23 12:02:33 +00:00
pvcreate.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvdisplay.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvmove.c Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
pvremove.c Defer writing PV labels to vg_write. 2011-06-01 19:29:31 +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 Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
toollib.h Const fixing 2011-02-18 14:47:28 +00:00
tools.h remove unnecessary lvconvert.h 2011-07-08 19:42:11 +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 Major pvmove fix to issue ioctls in the correct order when multiple LVs 2011-06-11 00:03:06 +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 Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00