Hi,
My name is Toon van der Pas. I live in the Netherlands and I
administer a bunch of servers that all run Gentoo Linux
since 1 1/2 year.
Today, as I was setting up a new Proliant DL380 server, I felt
courageous and decided to make use of udev instead of devfs.
To start with the good news: the machine is running with a
pure udev environment at this moment. But I thought that
maybe you would appreciate to hear about my experiences.
Some of the issues could probably be solved preliminary by adding
some hints to the document http://www.gentoo.org/doc/en/udev-guide.xml
1. This system contains a HP Smart Array 5i RAID controller, which
makes use of the cciss kernel module. The device names by which
the configured RAID volumes can be accessed will change when one
migrates from devfs to udev. This means that references to them
in /etc/fstab and /boot/grub/grub.conf (or /etc/lilo.conf) will
have to be changed accordingly.
For instance: /dev/discs/disc0/part1 becomes /dev/cciss/c0d0p1.
2. The udev daemon gets it's device names from sysfs.
Unfortunately sysfs only produces it's own internal enumerated
representation of device-mapper devices, instead of the name
as it is known internally to device-mapper.
This is very annoying when using LVM2. For instance, with udev
the device name changes from /dev/mapper/vg01-home to /dev/dm-1.
I don't know what the final solution is going to be, but as a
temporary solution a devmap_name utility was developed by the
multipath development team. It is part of their multipath-tools
package. Alas, this package isn't carried by Gentoo (yet).
So I downloaded the tarball from their web site, compiled/installed
it on our server, and changed /etc/udev/rules.d/50-udev.rules as
follows:
I commented out this line...
KERNEL="dm-[0-9]*", NAME=""
...and uncommented this line:
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
And lo and behold: it works like a charm!
The resulting udev device names are compatible with those from devfs.
It looks like this:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 51342 7744 40947 16% /boot
/dev/cciss/c0d0p3 963768 51532 863276 6% /
/dev/vg01/home 3096336 32884 2906168 2% /home
/dev/vg01/opt 3096336 164304 2774748 6% /opt
/dev/vg01/tmp 1032088 32836 946824 4% /tmp
/dev/vg01/usr 3096336 2006420 932632 69% /usr
/dev/vg01/var 3096336 69504 2869548 3% /var
none 1037752 0 1037752 0% /dev/shm
# ls -l /dev/dm*
brw-r----- 1 root root 254, 0 Sep 12 17:34 /dev/dm-0
brw-r----- 1 root root 254, 1 Sep 12 17:34 /dev/dm-1
brw-r----- 1 root root 254, 2 Sep 12 17:34 /dev/dm-2
brw-r----- 1 root root 254, 3 Sep 12 17:34 /dev/dm-3
brw-r----- 1 root root 254, 4 Sep 12 17:34 /dev/dm-4
# ls -l /dev/mapper/
total 0
crw-rw---- 1 root root 10, 63 Sep 12 17:34 control
brw------- 1 root root 254, 2 Sep 12 17:34 vg01-home
brw------- 1 root root 254, 3 Sep 12 17:34 vg01-opt
brw------- 1 root root 254, 4 Sep 12 17:34 vg01-tmp
brw------- 1 root root 254, 0 Sep 12 17:34 vg01-usr
brw------- 1 root root 254, 1 Sep 12 17:34 vg01-var
# ls -l /dev/vg*
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-home -> dm-2
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-opt -> dm-3
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-tmp -> dm-4
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-usr -> dm-0
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-var -> dm-1
/dev/vg01:
total 0
lrwxrwxrwx 1 root root 21 Sep 12 17:34 home -> /dev/mapper/vg01-home
lrwxrwxrwx 1 root root 20 Sep 12 17:34 opt -> /dev/mapper/vg01-opt
lrwxrwxrwx 1 root root 20 Sep 12 17:34 tmp -> /dev/mapper/vg01-tmp
lrwxrwxrwx 1 root root 20 Sep 12 17:34 usr -> /dev/mapper/vg01-usr
lrwxrwxrwx 1 root root 20 Sep 12 17:34 var -> /dev/mapper/vg01-var
That's all. It would be nice if this information was made available
in the Gentoo udev guide, for instance in a `hints' section.
Is the maintainer of the guide present on this mailing list?
Thank you for all the good work.
Regards,
Toon.
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
--
gentoo-doc@gentoo.org mailing list
My name is Toon van der Pas. I live in the Netherlands and I
administer a bunch of servers that all run Gentoo Linux
since 1 1/2 year.
Today, as I was setting up a new Proliant DL380 server, I felt
courageous and decided to make use of udev instead of devfs.
To start with the good news: the machine is running with a
pure udev environment at this moment. But I thought that
maybe you would appreciate to hear about my experiences.
Some of the issues could probably be solved preliminary by adding
some hints to the document http://www.gentoo.org/doc/en/udev-guide.xml
1. This system contains a HP Smart Array 5i RAID controller, which
makes use of the cciss kernel module. The device names by which
the configured RAID volumes can be accessed will change when one
migrates from devfs to udev. This means that references to them
in /etc/fstab and /boot/grub/grub.conf (or /etc/lilo.conf) will
have to be changed accordingly.
For instance: /dev/discs/disc0/part1 becomes /dev/cciss/c0d0p1.
2. The udev daemon gets it's device names from sysfs.
Unfortunately sysfs only produces it's own internal enumerated
representation of device-mapper devices, instead of the name
as it is known internally to device-mapper.
This is very annoying when using LVM2. For instance, with udev
the device name changes from /dev/mapper/vg01-home to /dev/dm-1.
I don't know what the final solution is going to be, but as a
temporary solution a devmap_name utility was developed by the
multipath development team. It is part of their multipath-tools
package. Alas, this package isn't carried by Gentoo (yet).
So I downloaded the tarball from their web site, compiled/installed
it on our server, and changed /etc/udev/rules.d/50-udev.rules as
follows:
I commented out this line...
KERNEL="dm-[0-9]*", NAME=""
...and uncommented this line:
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
And lo and behold: it works like a charm!
The resulting udev device names are compatible with those from devfs.
It looks like this:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 51342 7744 40947 16% /boot
/dev/cciss/c0d0p3 963768 51532 863276 6% /
/dev/vg01/home 3096336 32884 2906168 2% /home
/dev/vg01/opt 3096336 164304 2774748 6% /opt
/dev/vg01/tmp 1032088 32836 946824 4% /tmp
/dev/vg01/usr 3096336 2006420 932632 69% /usr
/dev/vg01/var 3096336 69504 2869548 3% /var
none 1037752 0 1037752 0% /dev/shm
# ls -l /dev/dm*
brw-r----- 1 root root 254, 0 Sep 12 17:34 /dev/dm-0
brw-r----- 1 root root 254, 1 Sep 12 17:34 /dev/dm-1
brw-r----- 1 root root 254, 2 Sep 12 17:34 /dev/dm-2
brw-r----- 1 root root 254, 3 Sep 12 17:34 /dev/dm-3
brw-r----- 1 root root 254, 4 Sep 12 17:34 /dev/dm-4
# ls -l /dev/mapper/
total 0
crw-rw---- 1 root root 10, 63 Sep 12 17:34 control
brw------- 1 root root 254, 2 Sep 12 17:34 vg01-home
brw------- 1 root root 254, 3 Sep 12 17:34 vg01-opt
brw------- 1 root root 254, 4 Sep 12 17:34 vg01-tmp
brw------- 1 root root 254, 0 Sep 12 17:34 vg01-usr
brw------- 1 root root 254, 1 Sep 12 17:34 vg01-var
# ls -l /dev/vg*
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-home -> dm-2
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-opt -> dm-3
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-tmp -> dm-4
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-usr -> dm-0
lrwxrwxrwx 1 root root 4 Sep 12 17:34 /dev/vg01-var -> dm-1
/dev/vg01:
total 0
lrwxrwxrwx 1 root root 21 Sep 12 17:34 home -> /dev/mapper/vg01-home
lrwxrwxrwx 1 root root 20 Sep 12 17:34 opt -> /dev/mapper/vg01-opt
lrwxrwxrwx 1 root root 20 Sep 12 17:34 tmp -> /dev/mapper/vg01-tmp
lrwxrwxrwx 1 root root 20 Sep 12 17:34 usr -> /dev/mapper/vg01-usr
lrwxrwxrwx 1 root root 20 Sep 12 17:34 var -> /dev/mapper/vg01-var
That's all. It would be nice if this information was made available
in the Gentoo udev guide, for instance in a `hints' section.
Is the maintainer of the guide present on this mailing list?
Thank you for all the good work.
Regards,
Toon.
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
--
gentoo-doc@gentoo.org mailing list