[systemd-devel] arch linux container filesystems

Lennart Poettering lennart at poettering.net
Fri Jun 20 04:51:20 PDT 2014


On Mon, 16.06.14 13:01, Robin Becker (robin at reportlab.com) 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.

Every user who logs in will nowadays get his own little /run/user/$UID
tmpfs directory for runtime purposes, with a strict size limit. logind
manages. Since this is a mount "df" will show it.

> I can imagine containers might not have /proc/kmsg &
> /proc/sys/kernel/random/boot_id; is that an error in df?

These files oiginate in out-of-namespace files the container itself
can't see. coreutils should probably get fixed to handle this more
gracefully (see other mail).

> Why do I have all the file system duplicates?

Probably because /proc/mounts is a bit limited, and df should probably
be smarter and look at /proc/self/mountinfo instead (see other mail).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list