[systemd-devel] systemd - cleaning of /var/run/
Hajo Locke
Hajo.Locke at gmx.de
Tue Sep 27 10:22:12 UTC 2016
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
More information about the systemd-devel
mailing list