Docker Community Forums

Share and learn in the Docker community.

Deleted file on mounted volume still exists


(Stuartz) #1

Galera docker (1.11.2) container on an Amazon EC2 ubuntu 14.04 mounts /var/lib/docker/data:/var/lib/msyql

When the node tries to sync with the group, it deletes most of the files in /var/lib/mysql and then creates new ones for the cluster. However, it fails on creating the new files because the old ones still exists. When I list /var/lib/docker/data, it is not there.

It only works after I have removed and recreated /var/lib/docker/data and has only written the initial files once when initiating the database before removing the files to sync with SST. If it has already been running, but gets to the point that it needs another SST, it fails.

What is the best way to mitigate this issue and keep the data persistent?