feedback re tmpfs
allard at nospam.nl
Sun Jan 25 04:37:36 PST 2004
On Sunday 25 January 2004 02:45, Bill's LFS Login wrote:
> On Sun, 25 Jan 2004, Allard Welter wrote:
> > Hello again,
> > So I've gone back to mounting tmpfs on /dev/shm as well as on /tmp and
> > /var/ tmp, although somewhere I read that mounting on /var/tmp is not
> > such a good idea as stuff here is sometimes needed after reboot. I can't
> > imagine this, why use a temporary directory then?
> Are you mounting tmpfs all three places? If you want the effects of
> that, I would think that symlinks from /var and /tmp would be more
Yup, but I'd forgotton about the entropy thing, so that'll be my homework for
today. I've got back into writing simulations in statistical physics and this
is rather an important point you raise (although for the moment I'm still
stuck on mutexes - linux-2.6.1 cooks with hreads BTW). The lights went on
even brighter after reading Jörg's post - time to get a copy of FHS.
> ln -s /dev/shm /tmp
> ln -s /dev/shm /var/tmp
> Even then I'm not sure this wouldn't offer the potential for some goofs.
> I'm thinking of mount seqyences. If tmpfs is not mounted when something
> goes to write into /tmp (only X related I *think* ATM) or /var/tmp (not
> even a guess here) there could be problems. Especially if the mount of
> tmpfs hid something important in those directories.
Again Jörg's post is helpful here. Also I use the size parameter. Since /dev/
shm is not used by much (a test by libc as far as I can gather) at the
moment. I figured a modest size to be sufficient instead of the default of
half your RAM. Now it is just a matter of linking any goofs that may happen
in the future to these customizations - it's all too easy to forget things
that appear to be functioning properly. Also, since the order in rcsysinit.d
is S10swap, S20mountproc, S30checkfs, S40mountfs I don't envisage any
Perhaps e2fsck uses a temp file? I really don't know - but it would seem
rational that swap will be used since it cannot be assumed that /tmp is not
part of the fs being checked.
> It sounds to me like you need to look for Archaic's thread on a
> read-only root FS in the archives. I thnk he had to deal with similar
> issues and he's probably got some nuggets in there related to /tmp and
There is a hint which I haven't read as I hadn't the need - but now you
mention it it is obvious that tmpfs is topical in this respect.
> Personally, if you are not shooting for a read-only fs, I wouldn't worry
> about /var/tmp. IIRC, only a very few very small files get put there
> (like a seed for urandom which *should* be maintained across boots so
> that entropy is maintained()?). It is important for some things
> which depend on pseudo-random numbers.
Well pointed out (see above) Thanks again, and Jörg of course. Back to
> > Regards - Allard.
> NOTE: I'm on a new ISP, if I'm in your address book ...
> Bill Maltby
> Fix line above & use it to mail me direct.
allard at quicknet.nl
More information about the lfs-support