Skip to contentSkip to conversation

fix description of lvcreate --regionsize

PATCH Applied Jun'ichi Nomura 2 participants 2 messages Oct 6, 2006 – Oct 7, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix description of lvcreate --regionsize

Hi,

While lvcreate man page says -R|--regionsize takes mirror region size in "KB", it actually takes the parameter as "MB". It's inconsistent.

This patch fixes man page to describe it as "MB".

Alternative fix could be change the line for regionsize_ARG in tools/args.h as follows:
arg(regionsize_ARG, 'R', "regionsize", size_kb_arg)
Then the command takes the argument as "KB".
This allows user to set smaller region size from command line but breaks compatibility with older versions.

I'm not sure which one is better.
If someone needs to choose region size smaller than 1MB, you can do it:

# lvcreate --config "activation {mirror_region_size=4}" -m1 -L100M vg

diffstat:

 man/lvcreate.8 |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Thanks,

Signature · 1 line
Jun'ichi Nomura, NEC Corporation of America
man/lvcreate.8 +3 -3
diff -X dontdiff -urp LVM2.02.alloclogspace/man/lvcreate.8 LVM2.03.regionsizefix/man/lvcreate.8
@@ -11,10 +11,10 @@ lvcreate \- create a logical volume in a
 {\-l/\-\-extents LogicalExtentsNumber[%{VG|FREE}] |
  \-L/\-\-size LogicalVolumeSize[kKmMgGtT]}
 [\-M/\-\-persistent y/n] [\-\-minor minor]
-[\-m/\-\-mirrors Mirrors [\-\-nosync] [\-\-corelog]]
+[\-m/\-\-mirrors Mirrors [\-\-nosync] [\-\-corelog]
+[\-R/\-\-regionsize MirrorLogRegionSize]]
 [\-n/\-\-name LogicalVolumeName]
 [\-p/\-\-permission r/rw] [\-r/\-\-readahead ReadAheadSectors]
-[-R|--regionsize MirrorLogRegionSize]
 [\-t/\-\-test]
 [\-v/\-\-verbose] [\-Z/\-\-zero y/n]
 VolumeGroupName [PhysicalVolumePath...]
@@ -116,7 +116,7 @@ Set read ahead sector count of this logi
 Ignored by device-mapper.
 .TP
 .I \-R, \-\-regionsize MirrorLogRegionSize
-A mirror is divided into regions of this size (in KB), and the mirror log 
+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.
 .TP
 .I \-s, \-\-snapshot
#1 lore raw
Quoted 1 line · Jun'ichi Nomura

This patch fixes man page to describe it as "MB".

Applied.

Quoted 3 lines

I'm not sure which one is better.
If someone needs to choose region size smaller than 1MB, you can do it:

# lvcreate --config "activation {mirror_region_size=4}" -m1 -L100M vg

Or simply lvcreate -R4k :-)

MB is just the default assumed if no units are supplied.

Alasdair

Signature · 1 line
[email protected]