hw
2017-Oct-05 09:32 UTC
[CentOS] how to prevent files and directories from being deleted?
Mark Haney <mark.haney at 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-systemd-tmpfiles-on-rhel7/ >>> >>> 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. -- "Didn't work" is an error.
Anand Buddhdev
2017-Oct-05 10:00 UTC
[CentOS] how to prevent files and directories from being deleted?
On 05/10/2017 11:32, hw wrote:>> 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.I can't believe people are still asking this question after being given appropriate advice. So let me repeat it, and don't ask again unless you've read this properly: 1. /var/run is a symlink to /run, which is a tmpfs mounted in RAM. 2. At reboot, /run vanishes, and EVERYTHING that was in it, vanishes with it. 3. For this reason, systemd ships with a utility called systemd-tmpfiles, which is run early in the boot process, to create any appropriate files and directories in /run. Packages that require directories to be present in /run (for keeping PID files or sockets), should ship with the appropriate tmpfiles.d snippets to have these directories created for them on boot. 4. Finally, if you as a sysadmin are using a package from a repo that isn't CentOS or EPEL, and this package is not following the CentOS packaging protocol for data in /run, then it is YOUR own responsibility to fix the package, or create your own tmpfiles.d snippet to create the required directories. 5. Learn about systemd-tmpfiles by reading the man pages of "systemd-tmpfiles" and "tmpfiles.d". This is as clear as crystal. If, despite this instruction, you cannot, or do not want to work with CentOS as it was intended, then stop whining about things here. Regards, Anand
marcos valentine
2017-Oct-05 12:36 UTC
[CentOS] how to prevent files and directories from being deleted?
Amand *Thank you for the explanation .* 2017-10-05 7:00 GMT-03:00 Anand Buddhdev <anandb at ripe.net>:> On 05/10/2017 11:32, hw wrote: > > >> 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. > > I can't believe people are still asking this question after being given > appropriate advice. So let me repeat it, and don't ask again unless > you've read this properly: > > 1. /var/run is a symlink to /run, which is a tmpfs mounted in RAM. > > 2. At reboot, /run vanishes, and EVERYTHING that was in it, vanishes > with it. > > 3. For this reason, systemd ships with a utility called > systemd-tmpfiles, which is run early in the boot process, to create any > appropriate files and directories in /run. Packages that require > directories to be present in /run (for keeping PID files or sockets), > should ship with the appropriate tmpfiles.d snippets to have these > directories created for them on boot. > > 4. Finally, if you as a sysadmin are using a package from a repo that > isn't CentOS or EPEL, and this package is not following the CentOS > packaging protocol for data in /run, then it is YOUR own responsibility > to fix the package, or create your own tmpfiles.d snippet to create the > required directories. > > 5. Learn about systemd-tmpfiles by reading the man pages of > "systemd-tmpfiles" and "tmpfiles.d". > > This is as clear as crystal. If, despite this instruction, you cannot, > or do not want to work with CentOS as it was intended, then stop whining > about things here. > > Regards, > Anand > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >
Mark Haney
2017-Oct-05 14:33 UTC
[CentOS] how to prevent files and directories from being deleted?
It's quite obvious you aren't using Centos packages. If you refuse to do as best practices insist (and have for nearly HALF A CENTURY) then no one here can help you. It seems to me that 1) you'd be better off compiling from source for your environment, or 2) that you need to follow practices established (probably) before you were born or 3) that you stop asking the list for thing no one in their right mind would do. How hard is that math? On Thu, Oct 5, 2017 at 5:32 AM, hw <hw at adminart.net> wrote:> Mark Haney <mark.haney at 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-systemd-tmpfiles-on-rhel7/ > >>> > >>> 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. > > > -- > "Didn't work" is an error. > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- [image: photo] Mark Haney Network Engineer at NeoNova 919-460-3330 <(919)%20460-3330> (opt 1) ? mark.haney at neonova.net www.neonova.net <https://neonova.net/> <https://www.facebook.com/NeoNovaNNS/> <https://twitter.com/NeoNova_NNS> <http://www.linkedin.com/company/neonova-network-services>
hw
2017-Oct-09 10:38 UTC
[CentOS] how to prevent files and directories from being deleted?
Anand Buddhdev <anandb at ripe.net> writes:> On 05/10/2017 11:32, hw wrote: > >>> 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. > > I can't believe people are still asking this question after being given > appropriate advice. So let me repeat it, and don't ask again unless > you've read this properly:I haven?t had time to read all of this thread before today.> 1. /var/run is a symlink to /run, which is a tmpfs mounted in RAM. > > 2. At reboot, /run vanishes, and EVERYTHING that was in it, vanishes > with it. > > 3. For this reason, systemd ships with a utility called > systemd-tmpfiles, which is run early in the boot process, to create any > appropriate files and directories in /run. Packages that require > directories to be present in /run (for keeping PID files or sockets), > should ship with the appropriate tmpfiles.d snippets to have these > directories created for them on boot. > > 4. Finally, if you as a sysadmin are using a package from a repo that > isn't CentOS or EPEL, and this package is not following the CentOS > packaging protocol for data in /run, then it is YOUR own responsibility > to fix the package, or create your own tmpfiles.d snippet to create the > required directories.Lighttpd is from epel.> 5. Learn about systemd-tmpfiles by reading the man pages of > "systemd-tmpfiles" and "tmpfiles.d". > > This is as clear as crystal. If, despite this instruction, you cannot, > or do not want to work with CentOS as it was intended, then stop whining > about things here.I?m not whining, and it?s not my fault that someone came up with the extremely stupid idea to use a ramdisk for /var/run. It?s also not my fault that lighttpd appears not to be packaged the way it would need to be, and the same goes for the mariadb packages provided for Centos by the mariadb people. Perhaps you should complain to whomever made this change for not waiting until all packages have been modified and to the package managers who didn?t modify them before actually deploying it, for not to mention the stupidity of the idea, rather than accusing me of whining. -- "Didn't work" is an error.
hw
2017-Oct-09 11:54 UTC
[CentOS] how to prevent files and directories from being deleted?
Mark Haney <mark.haney at neonova.net> writes:> It's quite obvious you aren't using Centos packages.Again: lighttpd is from epel. See [1]: "EPEL packages are usually based on their Fedora counterparts and will never conflict with or replace packages in the base Enterprise Linux distributions." If there wasn?t some sort of conflict, then there wouldn?t be an issue with lighttpd. Mariadb is from the mariadb repo. It is quite obvious that Centos causes issues because it is not following the FHS. [1]: http://fedoraproject.org/wiki/EPEL> If you refuse to do as best practices insist (and have for nearly HALFI?m not insisting on anything, I?m merely pissed that things are broken. It has turned out that this is due to the way Centos doesn?t follow the FHS. Not following the FHS probably doesn?t exactly fall under best practises, but Centos insists on doing so.> A CENTURY) then no one here can help you. It seems to me that 1) > you'd be better off compiling from source for your environment,And you guarantee that if I was to compile lighttpd from source, there wouldn?t be any issues? Who says that it is better to compile lighttpd from source rather than using a package specifically made for Centos that provides it? Who says that compiling your own packages falls under best practises? Do you compile all software you?re using yourself because otherwise you?d be refusing best practises? I thought it needless to say, but compiling from source instead of using packages provided by or for the distribution I?m using is virtually the opposite of following best practises, for a number of reasons. I only do that when there isn?t a better alternative.> or 2) that you need to follow practices established (probably) before > you were bornLiving in the past seldwhen is a good idea. Lots of practises that were established before I was born have disappeared, been replaced by others, or were revised. Why should I follow outdated practises?> or 3) that you stop asking the > list for thing no one in their right mind would do. > > How hard is that math?It doesn?t compute at all. Please don?t feel insulted by the following; it is not my intention to insult you. It?s merely what I?m thinking: I can see you saying repeatedly that things should be like you want them to be because you think that they have been the way you think they are for a long time and that everyone who doesn?t think the same way must be either out of their right mind, or stupid or both. That makes me think that you?re living in the past and, spinning around in that circle, lack the flexibility often times required nowadays, letting aside that there seem to be things you?re mistaken about. My understanding is also that your way of thinking tries to gain orientation by looking at structures and neglects the contents of those very structures; which is not a good idea because structures without content are hollow and rather meaningless, and anything but seldwhen, the content of these structures is far more relevant than the structures themselves, and requires to adjust ones ways of thinking --- and eventually the structures --- accordingly for to come up with desirable and adequate results. (IMHO this is something you really need to show your daughter, even if it probably doesn?t compute for you.) I?m much more understanding than mathematical. Unfortunately, math doesn?t make sense to me, and it is even illogical. That may very well qualify as "being out of my right mind" from your perspective, and I can live with that because from my perspective, it is not true that I am. -- "Didn't work" is an error.
Possibly Parallel Threads
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?
- how to prevent files and directories from being deleted?