From: Darren Lavender <dl1@hppine99.gbr.hp.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM2 tools lvmcmdline.c major and minor number limits
Date: Wed, 13 Feb 2008 13:36:03 +0000 [thread overview]
Message-ID: <1202909763.4345.129.camel@localhost.localdomain> (raw)
In-Reply-To: <20080213121530.GQ29914@agk.fab.redhat.com>
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
next prev parent reply other threads:[~2008-02-13 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 11:02 [linux-lvm] LVM2 tools lvmcmdline.c major and minor number limits Darren Lavender
2008-02-13 12:15 ` Alasdair G Kergon
2008-02-13 13:36 ` Darren Lavender [this message]
2008-02-13 14:53 ` Alasdair G Kergon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202909763.4345.129.camel@localhost.localdomain \
--to=dl1@hppine99.gbr.hp.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).