[23.0 backport] Work around missing rename support when the backing filesystem is overlayfs - #44834
Conversation
Raspberry Pi allows to start system under overlayfs. Docker is successfully fallbacks to fuse-overlay but not starting because of the `Error starting daemon: rename /var/lib/docker/runtimes /var/lib/docker/runtimes-old: invalid cross-device link` error It's happening because `rename` is not supported by overlayfs. After manually removing directory `runtimes` docker starts and works successfully Signed-off-by: Illia Antypenko <ilya@antipenko.pp.ua> (cherry picked from commit d591710) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…emoving it Signed-off-by: Illia Antypenko <ilya@antipenko.pp.ua> (cherry picked from commit 07ba3e3) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
Thx! Let me bring this one in |
|
The fix is incomplete. I use standard ubuntu-22.10, but my / and /home are different mounts (both are ext4). I saw this error:
|
|
Your issue is unrelated to what is being addressed here, and Docker Desktop does not yet include this code. Renaming from |
|
@WarShoe I think your issue is what's reported in this ticket; A fix for that should be included in the upcoming Docker Desktop 4.18 (but perhaps @felipecruz91 or @benja-M-1 can confirm) |
|
@thaJeztah Yes, that's correct - we'll be releasing a fix in Docker Desktop 4.18. |
Intro
Raspberry Pi allows to start system under overlayfs.
Docker is successfully fallbacks to
fuse-overlaybut not startingbecause of the
Error starting daemon: rename /var/lib/docker/runtimes /var/lib/docker/runtimes-old: invalid cross-device linkerror.It's happening because
renameis not supported by overlayfs.After manually removing directory
runtimesdocker starts and works successfully.relates to #25409 (comment)
dockerin this case isuserspace- What I did
Remove
runtimesdirectory in case renaming failed.- How I did it
On
os.renameerror try to removeruntimesdirectory .- How to verify it
Run a docker under the overlayfs as backing FS.
RUN mkdir -p "/docker/runtimes"right afterFROM dev-systemd-${SYSTEMD} AS devinDockerfilemake BIND_DIR=. shellwget -O /usr/local/bin/fuse-overlayfs https://github.com/containers/fuse-overlayfs/releases/download/v1.8.2/fuse-overlayfs-x86_64chmod +x /usr/local/bin/fuse-overlayfshack/make.sh binary install-binarydockerd --data-root /dockerWithout the fix docker is failing with
failed to start daemon: rename /docker/runtimes /docker/runtimes-old: invalid cross-device linkwith the fixdockerdstarts fine.- Description for the changelog
Remove
runtimesdirectory on startup in case renaming toruntimes-oldfailed- A picture of a cute animal (not mandatory but encouraged)
closes docker/for-linux#230