[systemd-devel] arch linux container filesystems

Dave Reisner d at falconindy.com
Mon Jun 16 06:00:18 PDT 2014


On Mon, Jun 16, 2014 at 01:01:31PM +0100, Robin Becker wrote:
> I asked about this at the arch linux forum, but got no response.
> 
> I run an up to date arch linux X64 system with systemd-213-9. I built a
> simple container using the wiki article
>    https://wiki.archlinux.org/index.php/Systemd-nspawn
> 
> after systemd-nspawn -bD ~/MyContainer and root login I see this in my df output
> 
> >root at MyContainer ~]# df
> >df: '/run/user/1000': No such file or directory
> >df: '/run/user/1000/gvfs': No such file or directory
> >df: '/proc/kmsg (deleted)': No such file or directory
> >df: '/proc/sys/kernel/random/boot_id (deleted)': No such file or directory
> >Filesystem     1K-blocks     Used Available Use% Mounted on
> >/dev/sda1      147418744 85779872  54127364  62% /
> >dev              1413900        4   1413896   1% /dev
> >tmpfs            1413900        0   1413900   0% /dev/shm
> >tmpfs            1413900        0   1413900   0% /sys/fs/cgroup
> >run              1413900       44   1413856   1% /run
> >tmpfs            1413900        0   1413900   0% /tmp
> >tmpfs            1413900        4   1413896   1% /dev
> >tmpfs            1413900        0   1413900   0% /dev/shm
> >tmpfs            1413900       44   1413856   1% /run
> >tmpfs            1413900        0   1413900   0% /sys/fs/cgroup
> >tmpfs            1413900        0   1413900   0% /tmp
> >tmpfs             282784        0    282784   0% /run/user/0
> >[root at MyContainer ~]#
> 
> 
> Is this what is expected? Not sure why my user id (1000) is being used.
> 
> I can imagine containers might not have /proc/kmsg &
> /proc/sys/kernel/random/boot_id; is that an error in df?
> 
> Why do I have all the file system duplicates?

You don't -- df doesn't understand namespaces. You should use a tool
which reads from /proc/self/mountinfo instead of /etc/mtab, e.g.
findmnt. If you want df-like output from findmnt, use 'findmnt -vD'.



More information about the systemd-devel mailing list