Docker in Overlayroot Environment: "Invalid Cross-Device Link"

Docker in Overlayroot Environment: "Invalid Cross-Device Link"

The docker daemon won't start inside my Ubuntu 18.04.4 LTS, started with overlayroot.

sudo journalctl --no-hostname --no-pager -b -u docker.service

gives me, among other things, this:

Feb 19 13:10:30 dockerd[1815]: Error starting daemon: rename /var/lib/docker/runtimes /var/lib/docker/runtimes-old: invalid cross-device link

From what I found out, this is telling me that somewhere down the line, overlay2fs is mounted inside an overlay2fs which doesn't seem to work.

Question: what do I need to do to start a Docker service inside an overlayroot environment?

1 Answer

I can just bind-mount the docker directory from the overlay'd filesystem. This works:

mount --bind /media/root-rw/overlay/var/lib/docker /var/lib/docker
systemctl start docker

Unfortunately, I'm still having trouble getting this to work at startup, but that's for another question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.