This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 236344 - lvextend -h shows mirror option
lvextend -h shows mirror option
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Milan Broz
Corey Marthaler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-13 07:31 EDT by masanari iida
Modified: 2013-02-28 23:05 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-19 07:18:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description masanari iida 2007-04-13 07:31:27 EDT
Description of problem:
lvextend -h shows mirror options [-m|--mirrors Mirrors]
But in order to convert single logical volume to mirrored,
we use "lvconvert" instead.

Man for lvextend doesn't include -m option for lvextend.
But only  lvextend -h shows that "-m" option.
This is confusing.

Version-Release number of selected component (if applicable):
lvm2-2.02.16-3.el5

How reproducible:
Always

Steps to Reproduce:
1. Install lvm2 rpm.
2. /usr/sbin/lvextend -h
  
Actual results:

# /usr/sbin/lvextend -h
  lvextend: Add space to a logical volume

lvextend
        [-A|--autobackup y|n]
        [--alloc AllocationPolicy]
        [-d|--debug]
        [-h|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents [+]LogicalExtentsNumber[%{VG|FREE}] |
         -L|--size [+]LogicalVolumeSize[kKmMgGtTpPeE]}
        [-m|--mirrors Mirrors]                                  <==
        [-n|--nofsck]
        [-r|--resizefs]
        [-t|--test]
        [--type VolumeType]
        [-v|--verbose]
        [--version]
        LogicalVolume[Path] [ PhysicalVolumePath... ]



Expected results:

# /usr/sbin/lvextend -h
  lvextend: Add space to a logical volume

lvextend
        [-A|--autobackup y|n]
        [--alloc AllocationPolicy]
        [-d|--debug]
        [-h|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents [+]LogicalExtentsNumber[%{VG|FREE}] |
         -L|--size [+]LogicalVolumeSize[kKmMgGtTpPeE]}
        [-n|--nofsck]
        [-r|--resizefs]
        [-t|--test]
        [--type VolumeType]
        [-v|--verbose]
        [--version]
        LogicalVolume[Path] [ PhysicalVolumePath... ]


Additional info:
Those who used to use LVM on HP-UX, at first, 
we try to use lvextend -m 1 to create a mirror.
Then we can find an error message that we failed to
extend the lvol to mirroring. 
And that is our starting point to investigate 
how to extend lvol to mirroring.
In that case, online manual of lvextend and 
"lvextend -h" output should be in sync.
Comment 1 Alasdair Kergon 2007-04-20 16:29:08 EDT
Hmmm.  lvextend -m in lvm2 means 'append to the LV a new section that is
mirrored'.  This is different from 'lvconvert -m'.

We can cover this with a special lvextend error message, because our lvextend
requires a size to be specified whereas - I presume (please check) - hpux
version doesn't.
Comment 2 Milan Broz 2008-12-19 07:18:19 EST
lvconvert -m1 : converts to mirror with 2 images

lvextend -m1 : adds (append) to existing LV new segment of specified size (here mirror of 2 images)

(currently mirror doesn't support some types of operation)

# lvextend -m 1 vg_test/mirr
  Please specify either size or extents but not both.
  Run `lvextend --help' for more information.

# lvextend -m 1 -l +1 vg_test/mirr
  Extending logical volume mirr to 8.00 MB
  Logical volume mirr successfully resized

# lvextend -l +1 vg_test/mirr
  Extending 2 mirror images.
  Extending logical volume mirr to 12.00 MB
  Logical volume mirr successfully resized

# lvextend -m0 -l +1 vg_test/mirr
  Cannot vary number of mirrors in LV yet.
  Run `lvextend --help' for more information.

So I think it works as expected, just the command usage differs from HP-UX LVM.
Here, "extend" always means add space, "convert" changes volume layout.

(And -m option will be documented in man page when mirror will support multiple segment types, it has no use today I think.)

Note You need to log in before you can comment on or make changes to this bug.