[Bug 1094019] Re: Linux's getdents gets /.. inode number from host system under LXC

Serge Hallyn 1094019 at bugs.launchpad.net
Wed Jan 2 16:32:41 UTC 2013

Ok, sorry, I see now.  Yes i can reproduce this with getdents of course.

This has nothing to do with lxc lying, and yes if you need to work
around this you'll need to use blockdev-backed rootfs for the

The container is set up with the tasks pivot_root'd into the container's
/, which in your case is a bind mount.  Resolution of '..' respects the
fact that the /var/lib/lxc/container/rootfs should be root, and returns
itself.  However, there is only one actual directory entry for
/var/lib/lxc/container/rootfs in all the kernel, and it's '..'
(d_parent) points to /var/lib/lxc/container.  Lxc can't do anything
about that.  The kernel's flexible mounts, bind mounts, and mounts
namespaces provide different *views* of the filesystems, don't change
what is in the actual filesystems.

** Changed in: lxc (Ubuntu)
       Status: New => Won't Fix

You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.

  Linux's getdents gets /.. inode number from host system under LXC

To manage notifications about this bug go to:

More information about the Ubuntu-server-bugs mailing list