Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about tmpfs and running folders.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 581

PostPosted: Tue Sep 18, 2012 7:09 am    Post subject: Question about tmpfs and running folders. Reply with quote

Background: Several PCs shall run via nfsroot - and use the same root folder... (I only need to emerge one directory to make a software update...)

However, some directories like

/tmp
/var/empty
/var/log
/var/lock
/var/run
/var/spool

are used and changed during runtime.

Q1: Can I mount them as tmpfs in fstab (The nodes have enough ram)?? Is that a problem? Are there any files written to these folders BEFORE mounting the directories from fstab?

Q2: How about a separate /etc for each machine. Any chance that I can mount the /etc as kernel command line?

Thanks in advance!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Tue Sep 18, 2012 6:09 pm    Post subject: Reply with quote

bastibasti

/var/lock
/var/run
have been moved to /run which is in tmpfs anyway. There are still packages that use the old locations but they will continue to work.

Do you reaklly want to put /var/log in tmpfs - you will loose all you logs unless you preserve this folder across reboots.
/var/spool is home for your mail, which has not yet been delivered to your users and in flight print jobs.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mgorny
Developer
Developer


Joined: 27 Apr 2007
Posts: 83

PostPosted: Thu Sep 20, 2012 8:53 am    Post subject: Re: Question about tmpfs and running folders. Reply with quote

bastibasti wrote:
Background: Several PCs shall run via nfsroot - and use the same root folder... (I only need to emerge one directory to make a software update...)


My and a few other people want to move software to /usr to simplify that. Sadly, that's a long way to go, and many people-obstacles on it.

Quote:
However, some directories like

/tmp
/var/empty
/var/log
/var/lock
/var/run
/var/spool

are used and changed during runtime.

Q1: Can I mount them as tmpfs in fstab (The nodes have enough ram)?? Is that a problem? Are there any files written to these folders BEFORE mounting the directories from fstab?


/tmp, /var/lock/, /var/run can be tmpfs already.

For the other locations, you will probably need to create additional subdirectories on boot (and chown/chmod them correctly!), e.g. using tmpfiles.d). Otherwise, the tools may have trouble accessing it.

Quote:
Q2: How about a separate /etc for each machine. Any chance that I can mount the /etc as kernel command line?


Don't think so. You'd rather have to NFS-mount /bin, /lib and so on, preferably in initramfs...
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 581

PostPosted: Sat Sep 22, 2012 5:39 pm    Post subject: Reply with quote

Hi. Thanks for the answers.

Looks like no easy solution for my problem :-)
Iam now thinking about mounting the whole FS as -o bind for each machine and give it a test run.

/var/log is not interesting at all. the machines are htpcs
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum