[Lxc-users] (no subject)
Daniel Lezcano
daniel.lezcano at free.fr
Wed Sep 15 21:10:34 UTC 2010
On 09/14/2010 09:51 PM, lxc at jelmail.com wrote:
[ cut ]
> #
> # Terminals
> lxc.tty =1 # allow one tty
>
Add this line in the configuration file:
lxc.pts = 1 # make a new pts instance
> lxc.cgroup.devices.allow = c 4:0 rwm # /dev/tty0 current virtual
> terminal
>
[ cut ]
> # cat /etc/lxc/mycontainer.fstab
>
And remove this one.
> none /srv/lxc/mycontainer/dev/pts devpts defaults 0 0
>
Make sure you don't have, in your container /lib/init/fstab, a devpts
mount point specified.
That should fix your problem.
A bit of explanation follows ;)
The devpts fs is a bit weird because you have to specify the
"new_instance" option to create a ... new instance. If not specified,
you will get the host devpts mounted in the container, it will be
shared. Of course, most of the distros are not aware of this option,
hence by default the unmodified containers distro will mount the host's
devpts :(
The lxc.pts = 1 does this "new instance" mount + a few things to make
available a fresh /dev/pts for the container.
The last trace you gave ...
":: Unmounting Filesystems
[BUSY]
umount: devpts busy - remounted read-only"
... make me thing it's the host's devpts which is mounted. So at the
container shutdown time, devpts is busy because your host is using it
(and probably some other containers are using it too).
However, I am curious to understand why a remount as read-only is
propagated in all the system as we are running in our own mount
namespace. I will ask to the kernel mailing list ...
Let us know if the problem is solved.
Thanks for the traces.
-- Daniel
More information about the lxc-users
mailing list