Re: LVM2 tools lvmcmdline.c major and minor number limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alasdair 

> On Wed, Feb 13, 2008 at 11:02:00AM +0000, Darren Lavender wrote:
> > I was wondering whether there was any particular reason why the
> > limitations below are still present given that these were changed
> > between 2.4 and 2.6 linux kernels?
>  
> Yes, it's probably time we changed that - nobody's noticed it before.
> We just have to check the code copes OK if someone sets it to a large number
> then reboots with a kernel that doesn't support it.

Sure.


> Setting the major number at device creation time is *still* not supported in
> 2.6.  (2.4 does support it.)

I think the interest is _only_ in the minor number but I noticed that I
had to specify --major at the command line or I received an error:


# lvcreate -n bigminor -l 5 -M y  --minor 70 vgtest
  Please specify major number with --major when using -My
  lvcreate: Create a logical volume



Without the -M  I get a different error:

# lvcreate -n new -l 5  --minor 72 vgtest
  Couldn't read major number for logical volume bigminor.
  Couldn't read major number for logical volume bigminor.
  Couldn't read major number for logical volume bigminor.
  Couldn't read major number for logical volume new.
  Couldn't read major number for logical volume bigminor.
  Couldn't read major number for logical volume new.
  Missing major number for persistent device
  Couldn't create ioctl argument
  Couldn't load device 'vgtest-new'.
  Perhaps the persistent device number -1:72 is already in use?
  Failed to activate new LV.


Hence the reason I just provided the DM major number in my original
example.

The man pages seem not to mention --major but it does show in the usage:


lvcreate
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
         -L|--size LogicalVolumeSize[kKmMgGtT]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
.......                          ^^^^^^^^^^^^^


So perhaps this whole area needs a little bit of an overhaul...???



Tested on SLES9SP3 with:

2.6.5-7.308-bigsmp #1 SMP Mon Dec 10 11:36:40 UTC 2007 i686 i686 i386
GNU/Linux

rpm -q lvm2:  
lvm2-2.01.14-3.23


Regards
-- 
Darren Lavender 

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux