Trying to move /var/lib/docker to another drive

  • I have am running OMV 4.1.32-1 on a Raspberry Pi 3B+. I have been trying to move the /var/lib/docker to a data drive and keep getting an error. I made the following changes:


    1) Edited /etc/openmediavault/config.xml to replace noexec with exec in
    the <fstab> <mntent> sections. and ran omv-mkconf
    fstab



    2) Edited /etc/default/openmediavault and added
    OMV_FSTAB_MNTOPS_EXT4="defaults,nofail,user_xattr,exec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0"


    Then:


    Code
    service docker stop

    Created daemon.json under the directory /etc/docker

    Code
    {  
     "graph": "/srv/dev-disk-by-id-ata-ST4000LM016-1N2170_W801F924-part2/docker"
    }




    Code
    rsync -aP /var/lib/docker/ /srv/dev-disk-by-id-ata-ST4000LM016-1N2170_W801F924-part2/docker


    The files copy successfully to their new location.

    Code
    mv /var/lib/docker /var/lib/docker.old


    Code
    service docker start


    The service starts correctly, but the container will not start. Instead I receive the following error:




    When I change the path back to /var/lib/docker everything works as expected, so I know I'm missing a step somewhere. I have searched the forum, but I just can't seem to figure out. Thanks so much for any guidance you all can provide.

  • Did you verify that the drive you want to be mounted exec is actually mounted exec? Look in /etc/fstab.


    Did you remount all drives or reboot?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Did you verify that the drive you want to be mounted exec is actually mounted exec? Look in /etc/fstab.


    Did you remount all drives or reboot?

    Thank you so much! I forgot that the drive I was trying to use is formatted ntfs, so it was not mounting exec using my existing parameters for that drive. Once I switched to the ext4 volume that was setup to mount exec in fstab the container started working properly. I really appreciate all of your help. Have a great night!

  • I also think that 'graph' in the /etc/docker/daemon.json is no longer the key depending on your version of docker. I think it is now 'docker_root'. I would have to look at mine later. No matter as from what I remember it was the only thing in the file for me anyway.

Jetzt mitmachen!

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