0

I am using mount --bind to share some directories/files between containers. My issue is that on root server boot, the containers are started, but these mounts are not yet mounted. Some of the services can't start and I have to manually restart all services inside the containers.

Thanks.

Vojtěch
  • 275
  • 3
  • 11
  • Do you have the mount entries mentioned in the `/etc/fstab` file of the containers? And are the services to be started `chkconfig`d on? – Sreeraj Dec 16 '14 at 08:17
  • Yes all mount --bind are in fstab, correctly working. All services also start correctly. Only they start BEFORE the mounts are finished. For inst. I am sharing /etc/hosts between all the machines. On boot, all containers behave like /etc/hosts file is empty. Once I restart the services manually, everything is okay. – Vojtěch Dec 16 '14 at 08:31
  • You mount --bind a file from the host to your container using fstab entries? that can't work as the container isn't started when fstab is parsed. Please always use mount-scripts for that purpose. See https://openvz.org/Bind_mounts – r_3 Jan 10 '15 at 18:12

0 Answers0