Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/…/merged: no such file or directory Error: failed to start containers:mydocker


sudo docker start mydocker
Error response from daemon: error creating overlay mount to /var/lib/docker/overlay2/b9c8e9b7d30…/merged: no such file or directory
Error: failed to start containers:mydocker

How to restore or re-start mydocker?

It depends on the cause but I don’t think that you can restart it. This error could happen when the container’s filesystem folder or the “merged” folder is missing. The reason could be a damaged disk which corrupted the filesystem, or something (or someone) edited the files without using Docker, or maybe Docker itself had an interrupted I/O operation. Even though there could be a way to fix it, it would require someone who knows exactly how the overlay filesystem works and How Docker stores its own metadata related to the container. I don’t think that “saving” a container is worth that effort. Containers should be stateless in a way that you don’t store anything important on the container’s filesystem so you have everything on volumes or in databases and you can just delete the container and start an other.

Thanks for your reply.

I have installed docker and data directory in root directory, and the root space was all filled by some cause, Yes, …/merged folder was deleted by some unsure cause.

I have fixed it in below way, let me share:

  • clear/free the root space
  • backup docker folder
  • re-pull an image
  • specified to backup folder

You mean image, not container, I guess. You can’t pull a container. That is what runs on your machine, created from an image, but it’sgood that you could solve it!.

Yes, you are right. I have corrected above comment.

I had similar issue.

Steps I took to resolve:

  1. docker login to registry (the registry of the last image I saw in the stack trace)
  2. docker pull for the last image I saw in the stack trace