You are not logged in.

#1 2015-06-15 15:41:50

jono
Member
Registered: 2012-01-03
Posts: 13

[SOLVED] df errors in Docker

Steps to reproduce:
>  docker run ubuntu df -l /
df: no file systems processed

I have noticed that when using Arch as a host my docker containers mount / differently then on my Ubuntu system.

I am wondering if anyone knows why because I have a program (MogileFS) that depends on local filesystems and is failing when Dockerized in Arch.
Here is my full experience.

Using Ubuntu 14 host:

>  uname -av
Linux digitus 3.13.0-54-generic #91-Ubuntu SMP Tue May 26 19:15:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>  docker --version
Docker version 1.6.2, build 7c8fca2
>  docker run ubuntu df
Filesystem                                             1K-blocks     Used Available Use% Mounted on
rootfs                                                 230157492 99560148 118882992  46% /
none                                                   230157492 99560148 118882992  46% /
tmpfs                                                    8193784        0   8193784   0% /dev
shm                                                        65536        0     65536   0% /dev/shm
/dev/disk/by-uuid/e86cc0f4-36,,,         230157492 99560148 118882992  46% /etc/hosts
tmpfs                                                    8193784        0   8193784   0% /proc/kcore
tmpfs                                                    8193784        0   8193784   0% /proc/latency_stats
tmpfs                                                    8193784        0   8193784   0% /proc/timer_stats
>  docker run ubuntu df -l /
Filesystem     1K-blocks     Used Available Use% Mounted on
none           230157492 99561624 118881516  46% /


Using Arch Linux host:

>  uname -av               
Linux ageras 4.0.5-1-ARCH #1 SMP PREEMPT Sat Jun 6 18:37:49 CEST 2015 x86_64 GNU/Linux
>  docker --version
Docker version 1.6.2, build 7c8fca2
>  docker run ubuntu df   
Filesystem                                                                         1K-blocks     Used Available Use% Mounted on
/dev/mapper/docker-254:0-4457836-a4a69a,,,,71744b1  10190136   236036   9413428   3% /
tmpfs                                                                                   3985956        0   3985956   0% /dev
shm                                                                                      65536        0     65536   0% /dev/shm
/dev/mapper/cryptAntergos                                              107140128 14880856  86793776  15% /etc/hosts
tmpfs                                                                                  3985956        0   3985956   0% /proc/kcore
tmpfs                                                                                    3985956        0   3985956   0% /proc/timer_stats
>  docker run ubuntu df -l /
df: no file systems processed
>  docker run ubuntu df -l 
Filesystem                1K-blocks     Used Available Use% Mounted on
tmpfs                       3985956        0   3985956   0% /dev
shm                           65536        0     65536   0% /dev/shm
/dev/mapper/cryptAntergos 107140128 14883984  86790648  15% /etc/hosts
tmpfs                       3985956        0   3985956   0% /proc/kcore
tmpfs                       3985956        0   3985956   0% /proc/timer_stats

Last edited by jono (2015-06-24 04:08:29)

Offline

#2 2015-06-22 13:13:40

jono
Member
Registered: 2012-01-03
Posts: 13

Re: [SOLVED] df errors in Docker

I want to delete this post but I cant figure out how to on this forum.

I found the problem was that Arch is causing Docker to use the Device Mapper storage driver. This makes it such that containers need to mount a remote filesystem for the root partition. This of course causes 'df -l /' to fail.

Ubuntu was using AUFS as its filesystem that uses a local root partition.

Offline

#3 2015-06-22 14:09:27

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [SOLVED] df errors in Docker

You cannot delete this post, but thanks for adding the solution. You should edit the first post and mark this thread as solved as well

Offline

#4 2015-07-23 17:35:58

Reason
Member
From: TN, USA
Registered: 2012-06-25
Posts: 7

Re: [SOLVED] df errors in Docker

Just to add to this discussion a little bit: docker picks its 'storage driver' out of a priority list: "aufs,btrfs,devicemapper,vfs,overlay", picking the first available driver.

AUFS isn't in the mainline kernel, but is in ubuntu's patched kernel.

You can override this behavior with "-s <driver>" to force docker to use one driver over another.

Offline

Board footer

Powered by FluxBB