I have a strange issue where a containers mounted volumes just seem to disappear. Some times this occurs after a few hours, sometimes it takes weeks. Even with daemon debugging turned on there is no messages related to the event when it happens. The only way I can detect it is with docker inspect on the container. When the container is operating properly, it looks like this:
"Mounts": [
{
"Type": "volume",
"Name": "faasrr01a.par06_CONFIG",
"Source": "/var/lib/docker/volumes/faasrr01a.par06_CONFIG/_data",
"Destination": "/config",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
},
{
"Type": "volume",
"Name": "faasrr01a.par06_VAR_LOG",
"Source": "/var/lib/docker/volumes/faasrr01a.par06_VAR_LOG/_data",
"Destination": "/var/log",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
}
],
Then suddenly it will disappear as such:
"Mounts": [],
At this point inside the running container the directory is still usable as normal but the mounted directory on the host is no longer updated. This causes the data to be lost once the container is restarted.
docker volume inspect looks ok even when it is in the bad state.
[
{
"CreatedAt": "2023-06-19T15:21:48-05:00",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/faasrr01a.par06_CONFIG/_data",
"Name": "faasrr01a.par06_CONFIG",
"Options": null,
"Scope": "local"
}
]
If anyone has seen this or has any further ideas on how to debug the issue it would be appreciated. Daemon info below.
Client: Docker Engine - Community
Version: 24.0.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.18.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 24.0.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version: v1.1.8-0-g82f18fe
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 4.18.0-477.10.1.el8_8.x86_64
Operating System: Red Hat Enterprise Linux 8.8 (Ootpa)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 377.6GiB
Name: ng-vrrpar0601
ID: 39b6ecb8-6356-49c9-a167-c0b4b9e6c87d
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 32
Goroutines: 47
System Time: 2023-11-14T10:58:33.33106763-06:00
EventsListeners: 0
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false