View previous topic :: View next topic |
Author |
Message |
bastibasti Guru
Joined: 27 Nov 2006 Posts: 581
|
Posted: Tue Sep 18, 2012 7:09 am Post subject: Question about tmpfs and running folders. |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Tue Sep 18, 2012 6:09 pm Post subject: |
|
|
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 |
|
|
mgorny Developer
Joined: 27 Apr 2007 Posts: 83
|
Posted: Thu Sep 20, 2012 8:53 am Post subject: Re: Question about tmpfs and running folders. |
|
|
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 |
|
|
bastibasti Guru
Joined: 27 Nov 2006 Posts: 581
|
Posted: Sat Sep 22, 2012 5:39 pm Post subject: |
|
|
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 |
|
|
|