Description of problem: [root@taft-03 ~]# lvcreate -n L -L 100M taft Logical volume "L" created [root@taft-03 ~]# lvcreate -n M -m 1 -L 100M taft Logical volume "M" created [root@taft-03 ~]# lvcreate -n S -i 2 -L 100M taft Using default stripesize 64.00 KB Rounding size (25 extents) up to stripe boundary size (26 extents) Logical volume "S" created [root@taft-03 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices L taft -wi-a- 100.00M /dev/sdb1(0) M taft mwi-a- 100.00M M_mlog 100.00 M_mimage_0(0),M_mimage_1(0) [M_mimage_0] taft iwi-ao 100.00M /dev/sdb1(25) [M_mimage_1] taft iwi-ao 100.00M /dev/sdc1(0) [M_mlog] taft lwi-ao 4.00M /dev/sdh1(0) S taft -wi-a- 104.00M /dev/sdb1(50),/dev/sdc1(25) [root@taft-03 ~]# lvconvert --stripes 2 taft/L Using default stripesize 64.00 KB [root@taft-03 ~]# lvconvert --stripes 2 taft/S Using default stripesize 64.00 KB [root@taft-03 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices L taft -wi-a- 100.00M /dev/sdb1(0) M taft mwi-a- 100.00M M_mlog 100.00 M_mimage_0(0),M_mimage_1(0) [M_mimage_0] taft iwi-ao 100.00M /dev/sdb1(25) [M_mimage_1] taft iwi-ao 100.00M /dev/sdc1(0) [M_mlog] taft lwi-ao 4.00M /dev/sdh1(0) S taft -wi-a- 104.00M /dev/sdb1(50),/dev/sdc1(25) [root@taft-03 ~]# lvconvert --stripes 4 taft/S Using default stripesize 64.00 KB [root@taft-03 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices L taft -wi-a- 100.00M /dev/sdb1(0) M taft mwi-a- 100.00M M_mlog 100.00 M_mimage_0(0),M_mimage_1(0) [M_mimage_0] taft iwi-ao 100.00M /dev/sdb1(25) [M_mimage_1] taft iwi-ao 100.00M /dev/sdc1(0) [M_mlog] taft lwi-ao 4.00M /dev/sdh1(0) S taft -wi-a- 104.00M /dev/sdb1(50),/dev/sdc1(25) Version-Release number of selected component (if applicable): 2.6.18-265.el5 lvm2-2.02.84-4.el5 BUILT: Thu Jun 2 05:04:32 CDT 2011 lvm2-cluster-2.02.84-3.el5 BUILT: Wed Apr 27 03:42:43 CDT 2011 device-mapper-1.02.63-3.el5 BUILT: Thu May 19 08:09:22 CDT 2011 device-mapper-event-1.02.63-3.el5 BUILT: Thu May 19 08:09:22 CDT 2011 cmirror-1.1.39-10.el5 BUILT: Wed Sep 8 16:32:05 CDT 2010 kmod-cmirror-0.1.22-3.el5 BUILT: Tue Dec 22 13:39:47 CST 2009 How reproducible: Everytime
lvconvert does not change the striping. --stripes means than any new space allocated will be striped, *if* the command allocates any space. lvconvert <lvname> sometimes completes an incomplete lvconvert So we probably want to give an error if --stripes is given without any accompanying conversion instructions. => Review all the current lvconvert cmdlines and add error messages as appropriate for combinations that include --stripes and *never* make sense.
The man page states: Exactly one of --splitmirrors, --mirrors, --repair, --snapshot or --merge arguments is required. It appears that is not being enforced - you did not specify any of those and did not get an error. Requires a complete reconciliation between the man page and the code, to make sure the allowed combinations of options are all documented and the code matches the documentation.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
(comment from RHEL6 bug 861227) Patch is upstream now (v2.02.99): http://git.fedorahosted.org/cgit/lvm2.git/commit/?id=cad22be3942809bac979d42195ea5a861a91a71f It allows the --stripes/--stripesize only with lvconvert --mirrors, --repair and --thinpool where it does make sense, otherwise, you get an error message: $ lvconvert --merge --stripes 2 vg/lvol0 --stripes or --stripesize argument is only valid with --mirrors, --repair or --thinpool Run `lvconvert --help' for more information. Man page has been updated accordingly - it's also mentioned that --stripes works for newly allocated space only.
I have cloned this as a documentation bug: BZ#953250 to be sure that we cover this in the LVM manual in addition to the man page.
(In reply to comment #8) > (comment from RHEL6 bug 861227) > > Patch is upstream now (v2.02.99): > > http://git.fedorahosted.org/cgit/lvm2.git/commit/ > ?id=cad22be3942809bac979d42195ea5a861a91a71f + https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=e8025aa67a05af046878f52dfb45fca30ed70084 (also allow --type with --stripes)
Maybe I am doing something wrong here, but when I run the command on purpose to cause it to display error it says: [root@r5-node02:~]$ lvconvert --stripes 2 test/L --stripes or --stripesize argument is only valid with --mirrors, --repair or --type but is --type supported at all by lvconvert? When I tried using it I got: lvconvert: unrecognized option `--type' Error during parsing of command line. There is no man page explanation of --type for lvconvert as well. Should this option actually be in RHEL5? If so, man page should reflect which types are supported, how the option is used and when it is expected.
(In reply to comment #12) > Maybe I am doing something wrong here, but when I run the command on purpose > to cause it to display error it says: > > [root@r5-node02:~]$ lvconvert --stripes 2 test/L > --stripes or --stripesize argument is only valid with --mirrors, --repair > or --type > > but is --type supported at all by lvconvert? > When I tried using it I got: > > lvconvert: unrecognized option `--type' > Error during parsing of command line. That's OK. The --type arg has been added for lvconvert later, v88 is just too old. So the --type has no meaning for lvconvert in v88. Sorry, I should have mentioned that... (I automatically added comment #11 for the additional upstream patch, but I did not realize at that moment it's not applicable to v88).
(In reply to comment #12) > Maybe I am doing something wrong here, but when I run the command on purpose > to cause it to display error it says: > > [root@r5-node02:~]$ lvconvert --stripes 2 test/L > --stripes or --stripesize argument is only valid with --mirrors, --repair > or --type (I'll remove the "type" from the error message in the final build)
The newest build of lvm2-88-11 has the corrected error messages and is enforcing the behavior described in man pages: [root@r5-node02:~]$ lvconvert --stripes 4 test/S --stripes or --stripesize argument is only valid with --mirrors and --repair Run `lvconvert --help' for more information. [root@r5-node02:~]$ lvconvert --stripes 4 test/L --stripes or --stripesize argument is only valid with --mirrors and --repair Run `lvconvert --help' for more information. Marking verified with lvm2-2.02.88-11.el5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1352.html