LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-10-2017, 10:17 AM   #1
swampthing001
Member
 
Registered: May 2005
Distribution: LFS, CentOS, Slack, Ubuntu
Posts: 112

Rep: Reputation: 8
Is it possible to prevent RH7 from cleaning /var/run/


Is it possible to prevent Red Hat 7 from cleaning /var/run? I know I can edit /usr/lib/tmpfiles.d and have it create a directory when it reboots but is there a way from preventing it from deleting it in the first place?
 
Old 02-10-2017, 10:43 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
In RHEL 7, /var/run is symlinked to /run, which is a tmpfs that exists only in memory. It ceases to exist when you shut down or reboot. You would have to arrange for it to be created as an ordinary directory if you want it to be persistent, and then be prepared to deal with any problems from the stale files that might get left behind there.
 
Old 02-10-2017, 10:50 AM   #3
swampthing001
Member
 
Registered: May 2005
Distribution: LFS, CentOS, Slack, Ubuntu
Posts: 112

Original Poster
Rep: Reputation: 8
Thanks for getting back to me. This is what I figured. I created a conf file in the tmpfiles.d directory that basically creates the directory after cleanup. All is good though, Ill just make changes to the project. Thanks again.
 
  


Reply

Tags
centos7, red hat, tmpfs



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a script for automatically cleaning up /var/spool/cups directory everyday thamim123 Linux - General 2 04-08-2014 09:44 AM
cleaning up /var/adm/wtmp Risc91 AIX 5 08-23-2004 09:52 AM
rm cannot remove /var/run/atd.pid and /var/run/xdm.pid danishmr Linux - Software 1 05-04-2004 08:01 AM
Cleaning up /var and /tmp.... Whitehat Linux - General 3 01-04-2004 07:07 PM
Cleaning up /var partition - what to delete? mattkat Red Hat 1 09-24-2003 02:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration