2

I am trying to move docker image storage.

OS Linux Mint 18.3

I tried multiple approaches including:

  • daemon-configuration-file /etc/docker/daemon.json { "graph": "/new/dir/docker"}

  • modifying DOCKER_OPTS ("-g /new/dir/docker")

  • even changing the docker.service file with the option above

I also synced the original /var/lib/ location with the new one. After I reloaded daemon and tried to start the docker service I usually receive this warning:

Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

systemctl status docker.service gives this:

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-02-02 17:04:31 CET; 7min ago
  Docs: https://docs.docker.com
Process: 6941 ExecStart=/usr/bin/dockerd -g /new/dir/docker -H fd:// (code=exited, status=1/FAILURE)
Main PID: 6941 (code=exited, status=1/FAILURE)

Feb 02 17:04:30 systemd[1]: Starting Docker Application Container Engine... 
Feb 02 17:04:30 dockerd[6941]: time="2018-02-02T17:04:30.429876920+01:00" level=info msg="libcontainerd: new containerd process, pid:  
Feb 02 17:04:31 dockerd[6941]: time="2018-02-02T17:04:31.449062453+01:00" level=error msg="'overlay2' is not supported over <unknown>" 
Feb 02 17:04:31 dockerd[6941]: time="2018-02-02T17:04:31.449096454+01:00" level=error msg="[graphdriver] prior storage driver overlay2 
Feb 02 17:04:31 dockerd[6941]: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver 
Feb 02 17:04:31 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE 
Feb 02 17:04:31 systemd[1]: Failed to start Docker Application Container Engine. 
Feb 02 17:04:31 systemd[1]: docker.service: Unit entered failed state. 
Feb 02 17:04:31 systemd[1]: docker.service: Failed with result 'exit-code'. Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.

So it seems to me it is trying to use a graph driver not supported in the filesystem on this partition. It is an ext4 formatted partition as well as in the original location, but this one is encrypted. Is the encryption actually causing problem with docker storage? If true, which driver should i use? What are the cons of different driver?

--

edit

when trying to switch driver to devicemapper, after restart a devicemapper directory with metadata appears in my new directory and it grows rapidly to enormous size until it consumes the whole disk (once I left the process running until it grew to 65 gb, then I had to manually kill it, ctrl+c did not work)

edit2

it seems it cannot ever work with ecryptfs https://github.com/moby/moby/issues/22577#issuecomment-223067996

0 Answers0