Docker Community Forums

Share and learn in the Docker community.

Merged directory not created inside /var/lib/docker/overlay2/ while running containers using Overlay2/Overlay


I am having issues related shim reaped and from my analysis i assume that it is due to file system related issue.

Please find my queries and suggets.

  • Backing file system showing as tmpfs with Overlay2. Is it okay to use tmpfs with Overlay2 or is there any issues.

  • Issue observed that overlay2 is not mouting on my system and also merged directory is not created.

docker info

DEBU[2021-03-11T14:22:55.186469164+01:00] Calling HEAD /_ping
DEBU[2021-03-11T14:22:55.188075665+01:00] Calling GET /v1.40/info
Debug Mode: false

Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 1
Server Version: 19.03.15
Storage Driver: overlay2
Backing Filesystem: tmpfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: ea765aba0d05254012b0b9e595e995c09186427f
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
Profile: default
Kernel Version: 5.10.8
Operating System: debian 18.04.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.827GiB
Name: EAGLE-CEF483654FB2
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 27
Goroutines: 41
System Time: 2021-03-11T14:22:55.193007501+01:00
EventsListeners: 0
Experimental: true
Insecure Registries:
Live Restore Enabled: false
Product License: Community Engine

If you are going to delete all data from the Docker directory anyway it is safe to:

Stop Docker Daemon
Remove the /var/lib/docker directory entirely
Restart Docker Daemon
Docker will then recreate any needed data directories.

You can also add:

“log-driver”: “json-file”,
“log-opts”: {“max-size”: “20m”, “max-file”: “3”},
to your /etc/docker/daemon.json to restrict log size and growth in the future or set the log-driver to “journald” to eliminate log files entirely.