Skip to contentSkip to conversation

add --regionsize option to lvconvert

PATCH New Jun'ichi Nomura 1 participant 1 message Oct 6, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add --regionsize option to lvconvert

Hi,

For mirrored LV, you can set region size at creation. However, you can't if you convert linear LV to mirrored LV.

Implementation is already there but the parser isn't set to accept the parameter.
Attached patch enables it.

Region size conversion of existing mirror isn't implemented yet and lvconvert rejects such request.

diffstat:

 man/lvconvert.8  |    6 +++++-
 tools/commands.h |    3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

Thanks,

Signature · 1 line
Jun'ichi Nomura, NEC Corporation of America
man/lvconvert.8 +5 -1
diff -X dontdiff -urp LVM2.02.alloclogspace/man/lvconvert.8 LVM2.03.regionsizefix/man/lvconvert.8
@@ -3,7 +3,7 @@
 lvconvert \- convert a logical volume between linear and mirror
 .SH SYNOPSIS
 .B lvconvert
-[\-m/\-\-mirrors Mirrors [\-\-corelog]]
+[\-m/\-\-mirrors Mirrors [\-\-corelog] [\-R/\-\-regionsize MirrorLogRegionSize]]
 [\-A/\-\-alloc AllocationPolicy]
 [\-h/\-?/\-\-help]
 [\-v/\-\-verbose]
@@ -28,6 +28,10 @@ mirror from using a disk-based (persiste
 an in-memory log.  You may only specify this option
 when the \-\-mirror argument is the same degree of
 the mirror you are changing.
+.TP
+.I \-R, \-\-regionsize MirrorLogRegionSize
+A mirror is divided into regions of this size (in MB), and the mirror log
+uses this granularity to track which regions are in sync.
 .SH Examples
 "lvconvert -m1 vg00/lvol1"
 .br
tools/commands.h +2 -1
diff -X dontdiff -urp LVM2.02.alloclogspace/tools/commands.h LVM2.03.regionsizefix/tools/commands.h
@@ -83,6 +83,7 @@ xx(lvconvert,
    "Change logical volume layout",
    "lvconvert "
    "[-m|--mirrors Mirrors [--corelog]]\n"
+   "\t[-R|--regionsize MirrorLogRegionSize]\n"
    "\t[--alloc AllocationPolicy]\n"
    "\t[-d|--debug]\n"
    "\t[-h|-?|--help]\n"
@@ -100,7 +101,7 @@ xx(lvconvert,
    "\t[--version]" "\n"
    "\tOriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]\n",
 
-   alloc_ARG, chunksize_ARG, mirrors_ARG, corelog_ARG,
+   alloc_ARG, chunksize_ARG, mirrors_ARG, corelog_ARG, regionsize_ARG,
    snapshot_ARG, test_ARG, zero_ARG)
 
 xx(lvcreate,