summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorJonathan Earl Brassow <jbrassow@redhat.com>2011-08-18 19:38:26 +0000
committerJonathan Earl Brassow <jbrassow@redhat.com>2011-08-18 19:38:26 +0000
commit6d04311efabec604e92664da1979176c1167e826 (patch)
treee775ca86c6b079309e82611c08b26377c12ed425 /man
parenta324baf6a13cb84f46dda81b6f3c7e795820c35d (diff)
downloadlvm2-6d04311efabec604e92664da1979176c1167e826.tar.gz
lvm2-6d04311efabec604e92664da1979176c1167e826.tar.xz
lvm2-6d04311efabec604e92664da1979176c1167e826.zip
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.
Diffstat (limited to 'man')
-rw-r--r--man/lvconvert.8.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 622cc337..43261dac 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -17,7 +17,7 @@ LogicalVolume[Path] [PhysicalVolume[Path][:PE[-PE]]...]
.br
.B lvconvert
-\-\-splitmirrors Images \-\-name SplitLogicalVolumeName
+\-\-splitmirrors Images [\-\-name SplitLogicalVolumeName] [\-\-trackchanges]
.br
MirrorLogicalVolume[Path] [SplittablePhysicalVolume[Path][:PE[-PE]]...]
.br
@@ -114,7 +114,8 @@ or has rules that ignore the devices LVM2 creates.
.I \-\-splitmirrors Images
The number of redundant Images of a mirror to be split off and used
to form a new logical volume. A name must be supplied for the
-newly-split-off logical volume using the \-\-name argument.
+newly-split-off logical volume using the \-\-name argument, unless
+the \-\-trackchanges argument is given.
.TP
.I \-n Name
@@ -122,6 +123,15 @@ The name to apply to a logical volume which has been split off from
a mirror logical volume.
.br
+.TP
+.I \-\-trackchanges
+This argument is used along with \-\-splitmirrors when the intention
+is to use the split-off image temporarily in a read-only fashion. Splitting
+off an image in this way allows it to be merged back into the mirror later
+- only resynchronizing those portions of the image that have changed since
+the split occurred. This option is only available to the "raid1" segment
+type.
+.br
.TP
.I \-s, \-\-snapshot