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.
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.
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.)