[Lxc-users] mounted filesystems inconsistency

Daniel Lezcano daniel.lezcano at free.fr
Tue Apr 5 12:15:53 UTC 2011


On 03/31/2011 11:41 AM, Milos Negovanovic wrote:
> Hi all,
>
> I have 3 identical LXC setups, 2 of which are sandboxes on different
> workstations and one is live environment. All 3 run Arch linux on host
> and inside the container.
>
> On one of the sandboxes output of mount after the container is started,
> from inside the container looks like this:
>
> [root at node1 spiked]# mount
> /dev/sda2[/home/stuff/lxc/node1.spiked.uk.com] on / type reiserfs (rw,relatime)
> devpts[/13] on /dev/console type devpts (ro)
> udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=1017469,mode=755)
>
>
> On other two LXC setups mount doesn't show anything! All 3 share the same
> configuration files and run last released LXC: 0.7.4.1.
>
> Any idea what might be happening?

Lxc mounts the mount point by directly using the syscalls without 
invoking the mount(3) command.
The mount command rely on /etc/mtab to write and read information.

Depending on what does your distro, that is invoking mount or not, 
/etc/mtab may be different.

If you want to check the consistency, you should look at /proc/mounts of 
each container.

> I only noticed it when after I restarted the container with the above
> mount output, devpts was re monted read only on the host.

Make sure the distro you are running is mounting devpts with the 
new_instance option.

> This is the config:
>
> root at box ~ # cat /etc/lxc/node1.spiked.uk.com
> lxc.utsname = node1.spiked.uk.com
>
> lxc.pts = 1024
>
> lxc.mount = /etc/lxc/node1.spiked.uk.com_fstab
> lxc.rootfs = /home/stuff/lxc/node1.spiked.uk.com
>
> lxc.network.type = veth
> lxc.network.flags = up
> lxc.network.link = br0
> lxc.network.hwaddr = 52:54:00:00:16:79
> lxc.network.ipv4 = 10.63.74.97
> lxc.network.name = eth0
> root at box ~ # cat /etc/lxc/node1.spiked.uk.com_fstab
> none /home/stuff/lxc/node1.spiked.uk.com/dev/pts devpts defaults 0 0
> none /home/stuff/lxc/node1.spiked.uk.com/proc    proc   defaults 0 0
> none /home/stuff/lxc/node1.spiked.uk.com/sys     sysfs  defaults 0 0
> none /home/stuff/lxc/node1.spiked.uk.com/dev/shm tmpfs  defaults 0 0
>
> Regards





More information about the lxc-users mailing list