On Oct 30, Tuomas Noraef <[EMAIL PROTECTED]> wrote:

> For instance, on the OpenVZ wiki, it is recommended for Gentoo 
> (http://wiki.openvz.org/Gentoo_template_creation#Set_up_udev ) to make udev 
> handle devices as static.
I do not understand why only /some/ devices would not be created.
OTOH I have no idea about if and how openvz virtualizes the uevents.

> Generic documentation in OpenVZ wiki ( 
> http://wiki.openvz.org/Physical_to_VE#.2Fdev ) explains that "/dev" mounted 
> on "tmpfs" does not get well along with containers, and recommends 
> their "/dev" to be static.
Obviously there is no much point in manually creating devices in a
transient tmpfs.

> such as libsane : first, udev will not get installed, not only because it 
> cannot touch "/proc/sys/kernel/hotplug", like on Etch, but also because if I 
> comment this one, it will fail to populate "/dev" from something in "/tmp". 
This is not clear. Maybe it can be fixed trivially, maybe not.

> its maintainer ;) "udev" works really good in Debian, by the way), but could 
> an "/etc/default/udev" config file mention a "CONTAINER" variable that, if 
> set to "1", will prevent its init script from being started (or from 
> touching "/dev") and "dpkg" from making it configure the "/dev" ? I guess it 
If it's really what we need then I can easily make udev automatically
disable itself when running in a openvz container, if you can provide
me the code to test for this condition.
I object to manual configuration of this.

Probably there is no point in running udev in a container, but a static
/dev is rarely a good idea nowadays. An elegant solution would be a read
only bind mount of the host dynamic /dev to the container /dev, but I am
not 100% sure that it would work. Can you try this?
As a fallback, copying the host /dev to each container at boot time
would be the next best thing.

> It would still be a workaround, but cleaner, IMHO, than make "udev" write 
> wherever but in "/dev" (CentOS 5's method, linked in the begining of my 
> message), while still allowing things hard-depending on "udev" to be 
> installed.
Centos wants to use HAL and HAL needs a working udev.
You can do this on Debian as well by setting udev_root in udev.conf, but
it's not well tested. And it's still not clear to me if uevents are
delivered to containers and how.
If you can make this work, then maybe using a different directory than
/dev could be the default behaviour when running in a container.

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature

Reply via email to