vmware-archive / vsphere-storage-for-docker

vSphere Storage for Docker
https://vmware.github.io/vsphere-storage-for-docker
Apache License 2.0
251 stars 95 forks source link

Files existing inside mount point not cloned to newly created named volume #2085

Open Foxi352 opened 6 years ago

Foxi352 commented 6 years ago

Environment: ESXi: 6.5U2 Docker: 18.03.1-ce Host OS: Photon OS 2.0

Not sure if this is a VDVS or Docker issue (or by design). When mounting a new Docker named volume to be created, and when the mount point inside the target container already contains files, these files are cloned to the newly created volume on first container start.

This seems not to be the case using VDVS driver. The .vmdk files are created on first container run, but the volume remain empty and a lot of containers complain that config files are missing e.t.c.

Foxi352 commented 6 years ago

To add to my previous comment: A lot of containers do try to heal themselves. If the mounted volume is empty they copy default config files into is. I used jordan/icinga2 as an example to do my testing.

Now the problem is VDVS volumes are NOT empty, but they contain a lost+found. I know where this is coming from, but can this be prevented ? I think this would solve a lot of problems.

freddyli commented 5 years ago

We are dealing with the same kind of problems too. Please see also the issue:

https://github.com/vmware/vic/issues/5777

from the vSphere Integrated Containers Engine project. They solved it by using a subfolder on the filesystem instead of the root of the filesystem as the volume.

Can you think of providing the same functionality here?

Alternatively maybe delete the lost+found directory after creating the filesystem..