On Tue, Oct 08, 2013 at 07:13:51AM -0700, Gherasim Dragos wrote:
> Hello,
> 
> Wondering if someone can help me with this:
> 
> - given a host where some raw devices are setup:
> 
>  raw -qa
> /dev/raw/raw1:  bound to major 7, minor 1
> /dev/raw/raw2:  bound to major 7, minor 2
> /dev/raw/raw3:  bound to major 7, minor 3
> 
> Added the following entry in config file for the container:
> 
> lxc.cgroup.devices.allow = b 162:* rwm

Hi,

The lxc-users mailing-list would probably have been more appropriate for this.

Your listing above shows devices that are 7:* yet you're allowing 162:*,
that's not going to do you much good :)

They also won't be created in the container unless they're created by
default by udev or you're getting a matching uevent.

As those seem like virtual devices bound to a kernel module, I don't
think they'll get auto-created, so you'll need to use mknod in the
container to create the node, then you should be able to use it.

Note that I also wrote an lxc-device tool which we ship in recent LXC
and lets you add new devices to your container after boot (not
persistent though). Using lxc-device you should be able to do:
 lxc-device add -n <container-name> /dev/raw/raw1

And /dev/raw/raw1 should appear in the container and be usable (you may
have to create /dev/raw first, I'm not sure lxc-device creates missing
directories).

> 
> Yet, the raw devices are not accessible in the container:
> 
> ls -la /dev/raw/
> total 8
> drwxr-xr-x 2 root root 4096 Oct  2 09:29 .
> drwxr-xr-x 6 root root 4096 Oct  8 06:08 ..
> 
> Any ideas?
> 
> Thank you,
> Dragos


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to