Mark Haney mark.haney@neonova.net writes:
On 10/03/2017 01:12 PM, hw wrote:
See
https://developers.redhat.com/blog/2016/09/20/managing-temporary-files-with-...
how to manage tmpfiles.
Thanks, I´ll look into that. I wouldn´t consider a directory like /var/run/mariadb in any way as only temporary --- and wouldn´t consider directories that are required for the system to work as temporary, either.
That directory isn't temporary. The files almost always are, but not the directories. As I said, whatever it is you're doing, it's wrong. I wouldn't continue to keep a setup like that as it's not standard practice to keep data in /var/run that isn't temporary.
Well, what am I supposed to do? The socket (or what it was) needs to be put somewhere, and IIRC, it wasn´t my choice to put it there but is a default. With mariadb, there are some defaults you can´t reasonably change because other software expects files where they usually are. And I don´t want to change that, I just want mariadb and lighttpd and other things to start on reboots rather than being broken because someone decided that files/directories they require are to be deleted on reboots before they can start.
However, you seem to be insistent on doing things contrary to best practices so.....
Curious, how did you install MariaDB that you have such a problem? The package shipping with CentOS does not create such issue.
I´m using the packages from mariadb.org. The old version that comes in Centos isn´t recommended, and I need features only the newer versions provide.
Lighttpd is from epel, and it has basically the same issue.
What issue? That the PID is dropped on reboot? What else are you putting in there? I'm beginning to question whether you know what you're doing or not. Lighttpd doesn't store any persistent info in /var/run/ because, like everything else, /var/run isn't for persistent data.
IIRC, lighttpd won´t start unless you mess with where it puts its pid file. I think I had to resort to put it into /tmp or something like that because the place where it´s supposed to put it gets deleted on reboots.
I´ve never before had issues like this.