Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 204997

Summary: RFE: major number request option should either be taken out of the help, or be ported to 2.6 and work
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: agk, dwysocha, heinzm, iannis, jbrassow, lmiksik, masanari_iida, nperic, prockai, slevine, xiaoli, zkabelac
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.88-13.el5 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1092638 (view as bug list) Environment:
Last Closed: 2014-09-16 00:24:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1092638    

Description Corey Marthaler 2006-09-01 21:45:22 UTC
Description of problem:

Major number gets ignored.

[root@link-08 ~]# lvcreate -L 20M -n major -My --major 222 --minor 111 gfs
  Logical volume "major" created

gfs-major        253 111 L--w    0    1      0
LVM-mlBLc3EbXgmSRUU8IZ5zLN143vKWfAqnFRsxOIpbkMYmzTLtneCEyrlbVwZznXMU

*** If this does get fixed, then the major number option needs to be added to
the man page. ***


Version-Release number of selected component (if applicable):
2.6.17-1.2519.4.18.el5

How reproducible:
everytime

Comment 1 Milan Broz 2006-09-04 15:19:46 UTC
*** Bug 165765 has been marked as a duplicate of this bug. ***

Comment 3 Milan Broz 2008-11-28 10:52:33 UTC
*** Bug 473394 has been marked as a duplicate of this bug. ***

Comment 5 Milan Broz 2012-03-22 16:28:19 UTC
This is open for years...

In kernel 2.6 specifying major number lost its importance with dynamic major allocated.

Can we deprecate this option in lvm2 upstream? I think it is now worth it to support it in kernel anymore.

Comment 6 Zdenek Kabelac 2013-05-14 11:10:08 UTC
I believe we just need to document this behavior and close this bug as CANTFIX.

Comment 7 Qian Cai 2013-08-06 08:46:36 UTC
*** Bug 858111 has been marked as a duplicate of this bug. ***

Comment 9 Peter Rajnoha 2014-01-30 10:39:14 UTC
OK, we can just document this a bit more.

Comment 10 Peter Rajnoha 2014-04-04 11:34:57 UTC
Finally, I've added a better check:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=a7c930b18da8f8179312e395c49f72080edd687e

Comment 11 Peter Rajnoha 2014-04-04 12:00:26 UTC
[0] raw/~ $ lvcreate -l1 -My --minor 10 vg
  Logical volume "lvol0" created

[0] raw/~ $ lvcreate -l1 -My --major 254 --minor 11 vg
  Ignoring supplied major number - kernel assigns major numbers dynamically. Using major number 253 instead.
  Logical volume "lvol1" created

[0] raw/~ $ lvs -o+major,minor
  lvol0 vg     -wima-----    4.00 253  10
  lvol1 vg     -wima-----    4.00 253  11

Comment 14 Nenad Peric 2014-05-02 12:44:16 UTC
[root@virt-122 ~]# lvcreate -L 20M -n major -My --major 222 --minor 111  vg
  Ignoring supplied major number - kernel assigns major numbers dynamically. Using major number 252 instead.
  Logical volume "major" created


[root@virt-122 ~]# lvs -o+major,minor vg/major
  LV    VG   Attr   LSize  Origin Snap%  Move Log Copy%  Convert Maj Min
  major vg   -wima- 20.00M                                       252 111


Marking VERIFIED with:

lvm2-2.02.88-13.el5

Comment 16 errata-xmlrpc 2014-09-16 00:24:47 UTC
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-2014-1218.html