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-15 20:24:47 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 1092638    

Description Corey Marthaler 2006-09-01 17:45:22 EDT
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 11:19:46 EDT
*** Bug 165765 has been marked as a duplicate of this bug. ***
Comment 3 Milan Broz 2008-11-28 05:52:33 EST
*** Bug 473394 has been marked as a duplicate of this bug. ***
Comment 5 Milan Broz 2012-03-22 12:28:19 EDT
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 07:10:08 EDT
I believe we just need to document this behavior and close this bug as CANTFIX.
Comment 7 CAI Qian 2013-08-06 04:46:36 EDT
*** Bug 858111 has been marked as a duplicate of this bug. ***
Comment 9 Peter Rajnoha 2014-01-30 05:39:14 EST
OK, we can just document this a bit more.
Comment 10 Peter Rajnoha 2014-04-04 07:34:57 EDT
Finally, I've added a better check:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=a7c930b18da8f8179312e395c49f72080edd687e
Comment 11 Peter Rajnoha 2014-04-04 08:00:26 EDT
[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 08:44:16 EDT
[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-15 20:24:47 EDT
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