1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-09 01:18:39 +03:00
lvm2/lib
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
..
activate Add the ability to split an image from the mirror and track changes. 2011-08-18 19:38:26 +00:00
cache Add detect_internal_vg_cache_corruption to lvm.conf 2011-08-11 17:46:13 +00:00
commands Add detect_internal_vg_cache_corruption to lvm.conf 2011-08-11 17:46:13 +00:00
config Add detect_internal_vg_cache_corruption to lvm.conf 2011-08-11 17:46:13 +00:00
datastruct Revert the #include changes. Need to fix this at the #include site for now, and 2011-07-18 14:34:33 +00:00
device Fix warning for pvcreate over MD linear. 2011-07-08 15:53:59 +00:00
display Fix some compile warnings on RHEL5 2011-03-01 20:17:56 +00:00
error Add lv_activate_opts structure 2011-06-17 14:14:19 +00:00
filters Add and use dev_open_readonly and variations. 2011-05-24 13:36:57 +00:00
format1 Defer writing PV labels to vg_write. 2011-06-01 19:29:31 +00:00
format_pool Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
format_text Replace free_vg with release_vg 2011-08-10 20:25:29 +00:00
freeseg Replace malloc with zalloc when creating segment_type's 2011-03-25 21:59:42 +00:00
label Report sector containing label in verbose message. 2011-06-01 15:30:36 +00:00
locking Suppress locking error messages in monitoring init scripts. 2011-08-11 15:27:46 +00:00
log Trivial, add void to ignore dm_snprinf result 2011-08-11 19:21:42 +00:00
metadata Add the ability to split an image from the mirror and track changes. 2011-08-18 19:38:26 +00:00
mirror Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag. 2011-06-17 14:17:16 +00:00
misc Add detect_internal_vg_cache_corruption to lvm.conf 2011-08-11 17:46:13 +00:00
mm Maintain a count of the number of suspended devices in libdevmapper 2011-06-13 03:32:45 +00:00
raid Compiler warning fixes, better error messaging, and cosmetic changes. 2011-08-13 04:28:34 +00:00
replicator Add lv_activate_opts structure 2011-06-17 14:14:19 +00:00
report Remove meaningless const type qualifiers on cast type 2011-08-04 14:30:51 +00:00
snapshot Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag 2011-06-17 14:22:48 +00:00
striped Add lv_activate_opts structure 2011-06-17 14:14:19 +00:00
unknown Slightly refactor the config code to allow better reuse (no functional change). 2011-07-18 13:26:08 +00:00
uuid Revert the #include changes. Need to fix this at the #include site for now, and 2011-07-18 14:34:33 +00:00
zero Add lv_activate_opts structure 2011-06-17 14:14:19 +00:00
Makefile.in Add ability to down-convert RAID1 arrays. 2011-08-11 18:24:40 +00:00