Re: support of older compilers [u]

From: Martin Schlemmer [c]
Date: Fri Nov 05 2004 - 17:40:58 EST


On Fri, 2004-11-05 at 22:59 +0100, Grzegorz Kulewski wrote:
> > The kernel does do more these days than it did in '95. But 6 times more? I
> > dunno..
>
> Can't we remove ramfs for a good start? Everyone should use tmpfs instead
> and some stupid distributions (I will not tell their names) try to mount
> ramfs on /dev (udev) and that leads to very stupid panic if you will
> write for example:
>
> dd if=/dev/evms/sda5 of=/dev/sda17 bs=1024
>
> instead of "of=/dev/evms/sda17".
>
> Explanation (if anybody needs one):
> Kernel can't create more partition devices than 15 for SCSI and SATA disks
> because of lack of minor numbers. So I am using evms to create these
> devices. So I should use /dev/evms/sda* for these partitions. And if I
> will not remember to do so then I will get oom panic very shortly because
> ramfs is not limited (in contrary to tmpfs).
>
> And this kind of stupid mistake can happen. It happened to me 3 times in a
> row before I started to debug what is wrong with this kernel.
>
> [BTW. Does somebody know how to tell the kernel that I do not want
> /dev/sda[0-9]* files (but I do want /dev/hda files) created == I do not
> want kernel partition driver to touch this particular device?]
>

So basically /dev/sda* have major of scsi, and /dev/evms/sda* have major
of evms, and you end up using the wrong nodes? This sounds more like
a udev-ruleset problem (not something that will be easy to get right
with a generic one I imagine), rather than anything remotely to do with
ramfs. If you changed the scripts to use tmpfs rather, you would have
gotten the same result.

Now I do not know evms, so you are on your own there, but here is my
rules for dm and a similar issue:

---------
nosferatu linux-2.6-bk # cat /etc/udev/rules.d/30-sda.rules
KERNEL="sda[0-9]*", NAME=""
nosferatu linux-2.6-bk # cat /etc/udev/rules.d/40-dm.rules
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="mapper/%c", SYMLINK="%c"
nosferatu linux-2.6-bk #

---------

(note that they should be before all the others if you only have one
rule file)

So basically for the real scsi devices (you could add a BUS="scsi" to
make sure I guess) matching 'sda[0-9]*' no node will be created, and I
get my /dev/mapper/* nodes, with a symlink in /dev/ making things
easier.

you could have a rule catching all evms devices, and then add
the /dev/sda* symlinks, perhaps like so:

--------
KERNEL="evms/sda[0-9]*", SYMLINK="sda%n"
--------

Note that I do not know if a rule was needed to get the nodes in
/dev/evms/ in the first place (due to my admitted lack of evms knowledge
above), so you might have to modify an existing rule ...

--
Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part