[Lxc-users] LXC: missing /dev/pts/nn
psihozefir
psihozefir at yahoo.com
Fri Nov 25 17:00:15 UTC 2011
I found the cause of this error:
1. When copying a container's filesystem I accidentally asked the copy program to copy the carracter device files from source to ordinary files on destination.
2. I fixed the above problem by getting a new /dev tree from a stage3 archive. The stage 3 archive doesn't contain the /dev/pts and /dev/shm directories and since udev isn't started on a LXC container, I had to create them manually.
HTH,
Sorin
________________________________
From: panca sorin <psihozefir at yahoo.com>
To: "lxc-users at lists.sourceforge.net" <lxc-users at lists.sourceforge.net>
Sent: Tuesday, June 14, 2011 5:30 PM
Subject: Re: [Lxc-users] LXC: missing /dev/pts/nn
Same problem here, on at least two of my hardware nodes.
Both, the nodes and the containers, run Gentoo on x86_64. Versions: lxc-0.7.4.1-r1, kernel 2.6.38-gentoo-r4 (gentoo-sources).
On the same hardware nodes there are other containers already started, which run just fine. The HN (hardware node) I just tried to start the container on has about 7 days of uptime during which the other container ran non-stop. (Unfortunatly, I can't restart the HN yet, but as soon as I do, I'll try to start my container and come back here with results.)
host1 ~ # lxc-start -n container1
lxc-start: No such file or directory - failed to mount 'none' on '/usr/lib/lxc/rootfs//dev/pts'
lxc-start: failed to setup the mounts for 'container1'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'container1'
host1 ~ # lxc-info -n container0
'container0' is RUNNING
host1 ~ # ls -al /usr/lib/lxc/rootfs/
total 4
drwxr-xr-x 2 root root 120 May 10 04:41 .
drwxr-xr-x 4 root root 128 May 10 04:41 ..
-rw-r--r-- 1 root root 0 May 10 04:41 .keep_app-emulation_lxc-0
-rw-r--r-- 1 root root 205 May 10 04:41 README
container1.conf:
lxc.utsname = container1
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.hwaddress = ac:de:48:47:3d:6f
lxc.network.vlan.id = 11
lxc.mount = /etc/lxc/container1.fstab
lxc.rootfs = /var/lib/lxc/container1
lxc.tty = 10
lxc.cgroup.cpuset.cpus = 0-23
lxc.cgroup.cpu.shares = 512
container1.fstab:
none /local/var/lib/lxc/container1/dev/pts devpts defaults 0 0
none /local/var/lib/lxc/container1/proc proc defaults 0 0
none /local/var/lib/lxc/container1/sys sysfs defaults 0 0
none /local/var/lib/lxc/container1/dev/shm tmpfs defaults 0 0
Here's my strace: http://pastebin.com/Ng3BJy9f
Sorin.
----- Original Message -----
From: Gus Power <gus at energizedwork.com>
To: Daniel Lezcano <daniel.lezcano at free.fr>
Cc: lxc-users at lists.sourceforge.net
Sent: Wednesday, June 8, 2011 10:26 AM
Subject: Re: [Lxc-users] LXC: missing /dev/pts/nn
Hi Daniel,
Here's the strace -f output: http://pastebin.com/raw.php?i=jWbG14Hg
The config for this node is as follows:
lxc.utsname = somenode.com
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.rootfs = /var/lxc/somenode.com
lxc.tty = 1
lxc.pts= 128
lxc.cap.drop = sys_module mknod mac_override sys_boot
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rw
lxc.cgroup.devices.allow = c 1:5 rw
lxc.cgroup.devices.allow = c 1:9 rw
lxc.cgroup.devices.allow = c 1:8 r
lxc.cgroup.devices.allow = c 136:* rw
lxc.cgroup.devices.allow = c 5:2 rw
lxc.cgroup.devices.allow = c 4:1 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
Thanks!
Gus.
On 07/06/11 19:51, Daniel Lezcano wrote:
> On 06/07/2011 11:17 AM, Gus Power wrote:
>> Hi Daniel,
>>
>> The rootfs directory exists and seems identical to another host I have
>> which is running containers fine:
>>
>>> ls -alh /usr/lib/lxc/rootfs
>> total 4.0K
>> drwxr-xr-x 2 root root 120 May 28 19:56 .
>> drwxr-xr-x 4 root root 128 May 28 19:56 ..
>> -rw-r--r-- 1 root root 0 May 28 19:56 .keep_app-emulation_lxc-0
>> -rw-r--r-- 1 root root 205 May 28 19:56 README
>>
>>> cat /usr/lib/lxc/rootfs/README
>> This directory must exist, even though no contents are ever placed
>> here. It is used to temporary mount the rootfs of lxc in a private
>> mount namespace only visible by the processes running in the
>> container.
>
> this rootfs is a temporary directory for pivot_root the rootfs. It is
> internally used by lxc and should not be specified in the configuration.
>
> By the way, can you give the configuration file of lxc ?
>
>>> ls -alh /dev/console
>> crw------- 1 root root 5, 1 Jun 1 16:03 /dev/console
>>
>> Running lxc-start under strace I see the following /dev/pt* references:
>> open("/dev/ptmx", O_RDWR) = 3
>> statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096,
>> f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0},
>> f_namelen=255, f_frsize=4096}) = 0
>> stat("/dev/pts/26", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 26),
>> ...}) = 0
>> stat("/dev/pts/26", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 26),
>> ...}) = 0
>> open("/dev/pts/26", O_RDWR|O_NOCTTY) = 4
>> open("/dev/ptmx", O_RDWR) = 5
>> stat("/dev/pts/27", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 27),
>> ...}) = 0
>> stat("/dev/pts/27", {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 27),
>> ...}) = 0
>> open("/dev/pts/27", O_RDWR|O_NOCTTY) = 6
>> read(10, lxc-start: No such file or directory - failed to mount a new
>> instance of '/dev/pts'
>>
>> Any ideas where I can go from here? (I really don't want to bounce the
>> host).
>
> Can you give the output of strace -f ?
>
> Thanks
> -- Daniel
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Lxc-users mailing list
Lxc-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20111125/d7539142/attachment.html>
More information about the lxc-users
mailing list