ZFS with Docker General Issue

  • Hi,
    i run into a big error last night with docker and zfs.


    If you use zfs as Storage and the Docker Shared Folder is on the zfs storage, you break your zfs because docker adds a mount to shared folder on on your zfs storgae but docker runs before zfs is mounted.
    So thats the problem, docker mount the storage folder but the zfs storage is not mounted yet.


    After that your zfs dont come up because the directory isnt empty


    Is that a known bug / problem? Cant believe that nobody else runs into this bug. How can i fix it?

  • Hi @nixmomo I can´t deliver a solution for your problem. But in the long ZFS thread there are some posts about ZFS import and file system mount sequence. Maybe it is helpful:


    https://forum.openmediavault.o…V/?postID=95727#post95727

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • Its definitivly a omv Bug.
    i delted the entry in my fstab but after a reboot its there again so i checked /etc/openmediavault/config.xml
    I found there the stupid entry


    Code
    <mntent>
            <uuid>076e02fc-c082-4c78-a468-19f41a1e139f</uuid>
            <fsname>/mnt/data/smb/virtualbox</fsname>
            <dir>/var/lib/docker/openmediavault</dir>
            <type>none</type>
            <opts>bind,defaults</opts>
            <freq>0</freq>
            <passno>0</passno>
            <hidden>0</hidden>
          </mntent>

    The funny point... Docker is deinstalled but this entry was not deleted....


    Thats really crazy... for what is this fstab entry? there is nothing in..

  • So no bugreport needed?


    i test that... if i do that and if i delete the entry in /etc/openmediavault/config.xml and in /etc/fstab is it coming back again?


    Just a simply Question, if this makes problems, why is the omv-plugin set this entry? or is it with zfs only (unbelievable)? Wouldn't be easier to set a symlink per default instead a fstab emntry?


    Ok i tried with a simple symlink but won't work

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; docker run -d -v /etc/localtime:/etc/localtime:ro --net=bridge -p 0.0.0.0:8181:8181/tcp -h "plexpy-nas" -e PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -e PS1="$(whoami)@$(hostname):$(pwd)$ " -e HOME="/root" -e TERM="xterm" --name="plexpy-nas" "linuxserver/plexpy:latest" 2>&1' with exit code '125': docker: Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/4644b3a602bcb5a8a6ee3034a1c2a03993d02d5b1ce5de17763cce6fce934a88-init/merged: invalid argument. See 'docker run --help'.
    • Offizieller Beitrag

    So no bugreport needed?

    You need to look for it in the corresponding section. https://github.com/OpenMediaVa…ault-docker-gui/issues/40

    i test that... if i do that and if i delete the entry in /etc/openmediavault/config.xml and in /etc/fstab is it coming back again?

    Of course it has always been that way whenever you perform certain action in omv. Select none in docker plugin and then save. then follow the instructions in the issue report. Maybe don't do rm -rfv, just move the old default docker folder.

    Just a simply Question, if this makes problems, why is the omv-plugin set this entry? or is it with zfs only (unbelievable)? Wouldn't be easier to set a symlink per default instead a fstab emntry?

    You will have to look at the very early stage of plugin development by @nicjo814. There we some issues at that time passing the -g parameter to docker daemon that some users reported. Eventually this hack came to do the job. Of course the problems arose later on as you can see,
    I am aware of the issue and i have my a fork of the plugin working on this issue along with no more usage of the tcp api (unix socket). I posted in the docker plugin thread, haven't got any replies so i haven't build the package.

  • hmm damn... so docker is unusable...


    after Reboot docker wont come up cause he don't like the symlink to the zfs share...


    it's realy crazy that don't use more users zfs... it's so much faster ...

  • Hmm... i thing i start to hate docker lol


    in log i see
    dockerd[2150]: time="2017-11-21T08:59:42.919906883+01:00" level=info msg="API listen on /var/run/docker.sock"


    But the Docker gui try to access api via tcp Port 42005
    There is nothing listen to this port....

  • yes it is zfs... my mount for this pool is /mnt/data


    I see in log that docker is running and up

    Code
    # ps aux|grep docker
    root      2150  0.1  0.2 438428 40448 ?        Ssl  08:59   0:02 /usr/bin/dockerd -H fd://
    root      2211  0.1  0.0 309360 10468 ?        Ssl  08:59   0:02 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
    root      5453  0.0  0.0  12752  2296 pts/0    S+   09:24   0:00 grep --color=auto docker


    Code
    # /var/log/daemon.log
    dockerd[2150]: time="2017-11-21T08:59:42.919906883+01:00" level=info msg="API listen on /var/run/docker.sock"


    But the Docker GUI in omv brings this error

    • Offizieller Beitrag

    Well the plugin communicates via the api to the daemon so is probably not in the db. Enable and disable the plugin, please don't select shared folder.


    Check then docker is running at the same port selected in the plugin


    systemctl status docker


    If is running check now that docker is using /var/lib/docker and the storage driver is zfs

  • i can't access the plugin GUI in OMV and made no changes there in settings... no shared folder, no port change, nothing... docker is up and running but the gui in omv is still not working..


    Now its sure... i hate fucking docker :D

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!