This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 855964 - enhance the man page to better explain the parity device wrt -i stripe flag
enhance the man page to better explain the parity device wrt -i stripe flag
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.3
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Jonathan Earl Brassow
Cluster QE
: ManPageChange
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 15:14 EDT by Corey Marthaler
Modified: 2013-02-21 03:13 EST (History)
11 users (show)

See Also:
Fixed In Version: lvm2-2.02.98-4.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:13:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2012-09-10 15:14:11 EDT
Description of problem:
Didn't it used to be that -m 2 meant 3 mirror legs, and -i 2 meant 2 stripe legs?

Now I see that has changed wrt RAID stripes, but not non RAID stripes. What is the proper meaning of the -i flag?

# NON RAID STRIPE

[root@taft-04 ~]# lvcreate -i 1 -n stripe -L 150M raid_sanity
  Rounding up size to full physical extent 152.00 MiB
  Logical volume "stripe" created
[root@taft-04 ~]# lvs -a -o +devices
  LV      VG          Attr     LSize    Devices
  stripe  raid_sanity -wi-a--- 152.00m  /dev/sdb1(0)

[root@taft-04 ~]# lvcreate -i 2 -n stripe -L 150M raid_sanity
  Using default stripesize 64.00 KiB
  Rounding up size to full physical extent 152.00 MiB
  Logical volume "stripe" created
[root@taft-04 ~]# lvs -a -o +devices
  LV      VG          Attr     LSize    Devices
  stripe  raid_sanity -wi-a--- 152.00m  /dev/sdb1(0),/dev/sdd2(0)

[root@taft-04 ~]# lvcreate -i 3 -n stripe -L 150M raid_sanity
  Using default stripesize 64.00 KiB
  Rounding up size to full physical extent 152.00 MiB
  Rounding size (38 extents) up to stripe boundary size (39 extents)
  Logical volume "stripe" created
[root@taft-04 ~]# lvs -a -o +devices
  LV      VG          Attr     LSize    Devices
  stripe  raid_sanity -wi-a--- 156.00m  /dev/sdb1(0),/dev/sdd2(0),/dev/sdg2(0)



# RAID STRIPE

[root@taft-04 ~]# lvcreate -i 1 --type raid4 -n stripe -L 150M raid_sanity
  Number of stripes must be at least 2 for raid4
  Run `lvcreate --help' for more information.
[root@taft-04 ~]# lvcreate -i 2 --type raid4 -n stripe -L 150M raid_sanity
  Using default stripesize 64.00 KiB
  Rounding up size to full physical extent 152.00 MiB
  Logical volume "stripe" created
[root@taft-04 ~]# lvs -a -o +devices
  LV                VG          Attr     LSize    Devices
  stripe            raid_sanity rwi-a-r- 152.00m  stripe_rimage_0(0),stripe_rimage_1(0),stripe_rimage_2(0)
  [stripe_rimage_0] raid_sanity iwi-aor-  76.00m  /dev/sdb1(1)
  [stripe_rimage_1] raid_sanity iwi-aor-  76.00m  /dev/sdd2(1)
  [stripe_rimage_2] raid_sanity iwi-aor-  76.00m  /dev/sdg2(1)
  [stripe_rmeta_0]  raid_sanity ewi-aor-   4.00m  /dev/sdb1(0)
  [stripe_rmeta_1]  raid_sanity ewi-aor-   4.00m  /dev/sdd2(0)
  [stripe_rmeta_2]  raid_sanity ewi-aor-   4.00m  /dev/sdg2(0)

[root@taft-04 ~]# lvcreate -i 3 --type raid4 -n stripe -L 150M raid_sanity
  Using default stripesize 64.00 KiB
  Rounding up size to full physical extent 152.00 MiB
  Rounding size (38 extents) up to stripe boundary size (39 extents)
  Logical volume "stripe" created
[root@taft-04 ~]# lvs -a -o +devices
  LV                VG          Attr     LSize    Devices                                                                    
  stripe            raid_sanity rwi-a-r- 156.00m  stripe_rimage_0(0),stripe_rimage_1(0),stripe_rimage_2(0),stripe_rimage_3(0)
  [stripe_rimage_0] raid_sanity iwi-aor-  52.00m  /dev/sdb1(1)
  [stripe_rimage_1] raid_sanity iwi-aor-  52.00m  /dev/sdd2(1)
  [stripe_rimage_2] raid_sanity iwi-aor-  52.00m  /dev/sdg2(1)
  [stripe_rimage_3] raid_sanity iwi-aor-  52.00m  /dev/sde1(1)
  [stripe_rmeta_0]  raid_sanity ewi-aor-   4.00m  /dev/sdb1(0)
  [stripe_rmeta_1]  raid_sanity ewi-aor-   4.00m  /dev/sdd2(0)
  [stripe_rmeta_2]  raid_sanity ewi-aor-   4.00m  /dev/sdg2(0)
  [stripe_rmeta_3]  raid_sanity ewi-aor-   4.00m  /dev/sde1(0)


Version-Release number of selected component (if applicable):
2.6.32-279.el6.x86_64
lvm2-2.02.95-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
lvm2-libs-2.02.95-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
lvm2-cluster-2.02.95-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
udev-147-2.41.el6    BUILT: Thu Mar  1 13:01:08 CST 2012
device-mapper-1.02.74-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
device-mapper-libs-1.02.74-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
device-mapper-event-1.02.74-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
device-mapper-event-libs-1.02.74-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
cmirror-2.02.95-10.el6_3.1    BUILT: Tue Aug 28 09:31:04 CDT 2012
Comment 1 Corey Marthaler 2012-09-10 15:23:20 EDT
I'm forgetting about the parity disk. :( -i 2 equals two stripe disks plus one parity.
Comment 2 Jonathan Earl Brassow 2012-11-30 18:14:54 EST
commit 83978cdec8aa6f6b6af2cb8937d64cc16b88cf18
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Fri Nov 30 16:47:02 2012 -0600

    man page (lvcreate):  Better explain stripes option for RAID 4/5/6.
    
    Do a better job explaining the '--stripes/-i' option to lvcreate
    when it comes to RAID 4/5/6.  The extra devices needed for parity
    are implicitly added to the argument given.  So a 5-device RAID6
    logical volume is created with '-i 3' - indicating 3 stripes plus
    the implicit 2 devices needed for RAID6.


Description now reads:
      -i, --stripes Stripes
              Gives the number of stripes.  This is equal to the  number  of
              physical volumes to scatter the logical volume.  When creating
              a RAID 4/5/6 logical volume, the extra devices which are  nec‐
              essary  for  parity  are internally accounted for.  Specifying
              '-i 3' would use 3 devices  for  striped  logical  volumes,  4
              devices for RAID 4/5, and 5 devices for RAID 6.
Comment 4 Nenad Peric 2012-12-14 04:19:57 EST
Checked the man pages and compared with lvcreate functionality (ie. -i 3 with --type raid4 used 4 devices, 3 stripe + internally accounted for parity). 

Marking verified with:

lvm2-2.02.98-5.el6
Comment 5 errata-xmlrpc 2013-02-21 03:13:38 EST
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-0501.html

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