[Lxc-users] Some /dev/dm-* not exists in guest

Giovanni Lovato heruan at aldu.net
Sat May 19 10:51:14 UTC 2012


I'm using LXC on Ubuntu 12.04, and I have 4 LVM logical volumes:

lxc-host$ ls -l /dev/dm-*
brw-rw---- 1 root disk 252, 0 May 19 11:47 /dev/dm-0
brw-rw---- 1 root disk 252, 1 May 19 11:47 /dev/dm-1
brw-rw---- 1 root disk 252, 2 May 19 11:47 /dev/dm-2
brw-rw---- 1 root disk 252, 3 May 19 11:47 /dev/dm-3
brw-rw---- 1 root disk 252, 4 May 19 11:47 /dev/dm-4

I need dm-3 and dm-4 to be available on a guest, but I only see dm-0 and dm-4

lxc-guest$ ls -l /dev/dm-*
brw-rw---- 1 root disk 252, 0 May 13 03:05 /dev/dm-0
brw-rw---- 1 root disk 252, 4 May 19 02:35 /dev/dm-4

This is the guest configuration:
#### BEGIN ####
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br2
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.2.13/24

lxc.utsname = lxc-guest

lxc.devttydir =  lxc
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /var/lib/lxc/lxc-guest/rootfs
lxc.mount  = /var/lib/lxc/lxc-guest/fstab
lxc.arch = i686
lxc.cap.drop = sys_module mac_admin
# uncomment the next line to run the container unconfined:
#lxc.aa_profile = unconfined

lxc.cgroup.devices.deny = a
# Allow any mknod (but not using the node)
lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
#lxc.cgroup.devices.allow = c 4:0 rwm
#lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm
# fuse
lxc.cgroup.devices.allow = c 10:229 rwm
# tun
lxc.cgroup.devices.allow = c 10:200 rwm
# full
lxc.cgroup.devices.allow = c 1:7 rwm
# hpet
lxc.cgroup.devices.allow = c 10:228 rwm
# kvm
lxc.cgroup.devices.allow = c 10:232 rwm
#### END ####

I tried to add:

lxc.cgroup.devices.allow = b 252:* rwm

but nothing changed!

I can't understand this behavior, I'm clearly missing something!

Giovanni





More information about the lxc-users mailing list