LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2020, 03:49 AM   #1
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Rep: Reputation: 67
/run & /var/run being a tmpfs


Hello,

Speaking of a recent change in current,
are we sure that having /run and now also /var/run, because it's a bind mount, as tmpfs is fine?

I've already found issues with services that do not recreate a folder in /var/run at startup because they expect it to be permanent, and so they don't start.

Is it the services that should be fixed or the directory that should be made not a tmpfs?
 
Old 02-16-2020, 04:09 AM   #2
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Hi,

I talked about that is this post.

The idea is to create the folder automatically when using "/etc/rc.d/rc.mydaemon start", so we have to adapt many SB.
 
Old 02-16-2020, 04:27 AM   #3
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: Slackware®
Posts: 257

Rep: Reputation: Disabled
If possible, try to compile with different path.
 
Old 02-16-2020, 04:40 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
just a suggestion: if you get in touch with the scripts maintainers and ask to adapt them to create the the directory (as-needed) at start they will be current-ready in no-time.

Quote:
Originally Posted by linuxxer View Post
If possible, try to compile with different path.
IMHO there should be no need, because the stuff in /var/run/*/ if meant to be "volatile" in the first place so should be fine for it to disappear at reboot...

Last edited by ponce; 02-16-2020 at 05:02 AM.
 
1 members found this post helpful.
Old 02-16-2020, 05:38 AM   #5
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by ponce View Post
just a suggestion: if you get in touch with the scripts maintainers and ask to adapt them to create the the directory (as-needed) at start they will be current-ready in no-time.
Yes, I can also fix them myself once I find out what was there before and what permissions it had, considering that previous content of /var/run has been efficently wiped

Btw it seems that the "other system" has got a method to deal with this.
 
Old 02-16-2020, 12:46 PM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by lonestar_italy View Post
Btw it seems that the "other system" has got a method to deal with this.
Why use something simple like a mkdir in the sysinit script when you can come up with something really complicated instead. Typical freedesktop/Lennart solution.
 
5 members found this post helpful.
Old 02-16-2020, 01:23 PM   #7
chrisVV
Member
 
Registered: Aug 2010
Posts: 548

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by GazL View Post
Why use something simple like a mkdir in the sysinit script when you can come up with something really complicated instead. Typical freedesktop/Lennart solution.
Why set up a bind mount for /var/run in rc.S, when a symlink to the /run tmpfs would do just as well and require nothing in rc.S at all? Choices.

Last edited by chrisVV; 02-16-2020 at 01:26 PM.
 
Old 02-16-2020, 01:33 PM   #8
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,505

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by lonestar_italy View Post
I've already found issues with services that do not recreate a folder in /var/run at startup because they expect it to be permanent, and so they don't start.
If there are services that are part of Slackware, please let me know which ones are affected so that I can fix them.
 
Old 02-16-2020, 03:36 PM   #9
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by volkerdi View Post
If there are services that are part of Slackware, please let me know which ones are affected so that I can fix them.
No, nothing from the core packages. No worries 🙂
 
1 members found this post helpful.
Old 02-17-2020, 10:55 AM   #10
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by volkerdi View Post
If there are services that are part of Slackware, please let me know which ones are affected so that I can fix them.
/var/run/named would need to be created, even if named seems to be working fine without it.
When it exists, the named.pid will be inside it, otherwise it's not present.
 
Old 02-17-2020, 11:32 AM   #11
Thom1b
Member
 
Registered: Mar 2010
Location: France
Distribution: Slackware
Posts: 484

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Quote:
Originally Posted by lonestar_italy View Post
/var/run/named would need to be created, even if named seems to be working fine without it.
When it exists, the named.pid will be inside it, otherwise it's not present.
By default, the folder is automatically created by named, there is no need to change anything in rc.bind. I just tried to "rc.bind stop" then "rm -rf /var/run/named" then "rc.bind start". The folder is here with "named.pid" and "session.key" inside.
 
1 members found this post helpful.
Old 02-17-2020, 02:44 PM   #12
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by Thom1b View Post
By default, the folder is automatically created by named, there is no need to change anything in rc.bind. I just tried to "rc.bind stop" then "rm -rf /var/run/named" then "rc.bind start". The folder is here with "named.pid" and "session.key" inside.
I can't confirm it. I have to create it manually after reboot otherwise it's not there.

Edit: but probably I realized why. I start named with "-u daemon" so probably it doesn't have permission to create the folder on its own. It's an old habit of not running named as root. So nevermind, it doesn't require a fix in the startup script.

Last edited by lonestar_italy; 02-17-2020 at 02:47 PM. Reason: Addition
 
Old 02-17-2020, 02:47 PM   #13
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,505

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by lonestar_italy View Post
I can't confirm it. I have to create it manually after reboot otherwise it's not there.
Any chance you're starting named with -u <some-non-root-user>?
 
Old 02-17-2020, 05:14 PM   #14
lonestar_italy
Member
 
Registered: Nov 2010
Location: Italy
Distribution: Slackware64-current
Posts: 169

Original Poster
Rep: Reputation: 67
Quote:
Originally Posted by volkerdi View Post
Any chance you're starting named with -u <some-non-root-user>?
yeah, I added it to the previous post
I'm following the old way of starting it with -u daemon.. it's still referred in rc.bind
Maybe it's good to add a note that if still using this method, recreating /var/run/named at boot is on the user.
 
Old 02-17-2020, 10:50 PM   #15
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by chrisVV View Post
Why set up a bind mount for /var/run in rc.S, when a symlink to the /run tmpfs would do just as well and require nothing in rc.S at all? Choices.
It doesn't do just as well. I did a lot of initial testing on this starting several years ago, and while it was indeed rare, there were cases where things didn't like the symlink being there. One of them something in the core distribution, but I cannot for the life of me recall what it was.
 
  


Reply



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
Reducing writes to SSD: mounting /var (and others) on RAM disks (tmpfs). sysfce2 Slackware 7 08-26-2011 02:00 AM
/etc/fstab "tmpfs /tmp tmpfs defaults 0 0" ramfs?! HOW? xcislav Linux - General 2 06-04-2011 03:03 AM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Mounting /var/log as a tmpfs mr666white Linux - Laptop and Netbook 2 12-06-2004 08:07 PM
Gotta love those &#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&#1649;&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:48 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