Hello List,

we use Ubuntu16 and systemd. I have following problem.
We use "mount --bind" to bind folder /var/run/mysqld to different custom folders. We use this to bind the mysql-socketfile into a ssh-chroot.

example:

mkdir mysqld
mount --bind /var/run/mysqld/ mysqld/
ls mysqld/
mysqld.pid  mysqld.sock  mysqld.sock.lock


When restarting mysql, then folder /var/run/mysqld is deleted and recreated. Result is that every mounted folder is loosing his content, because "mount --bind" does not find its source any more.

Is there a way to prevent systemd from removing /var/run/mysqld ? If possible this folder should be reused every time, just we know it from former init-deamons. Otherwise i have to edit mysql.service file and insert a second ExecStartPost to run a script which corrects the bindings. This would fix the problem, but there would also be a short time where mysql-socket dependent commands can fail. Iam not happy with this workaround.
Do you have a suggestion?

Thanks,
Hajo

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to