A question about /tmp
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Mon Aug 9 13:00:35 PDT 2004
>
> Gary Mulder wrote:
> > Of course having /tmp -> /var/tmp means that you have no valid /tmp in
> > single user mode where /var is not mounted. That is unless you created
> > /var/tmp in single user mode, but that would mean /var would be mounted
> > over the root partition's /var/tmp dir in multi-user mode, which can be
> > non-intuitive to say the least.
>
> Excellent point. I think one is much safer having /tmp as a directory on the
> root filesystem, and using something like md(4) to mount a RAMdisk over that
> location when going into multiuser mode (or mount a real /tmp partition if you
> prefer).
Well, that is debateable. The safest is for /tmp to be its own
partition/filesystem. If you have it in root, and some runaway process
fills it up, it can bring the system to a grinding halt. So, unless I
am making one of those setups where it is all one big filesystem - that
being root (/), I protect root by putting things that can grow in an
unplanned manner in separate filesystems/partitions. Things such
as /tmp, /var/log, /var/spool, /var/db, /usr/src and user's own home
directory space if you have users on your system. Some of these I
put in a big catch all filesystem such as /home and make sym links, but
since /tmp can be needed under inconvenient circumstances such as
when you are trying to fix something in single user, I make it its
own partition.
////jerry
>
> > The net result of not having a valid /tmp is that some commands issued
> > in single-user mode may fail non-obviously as they might (reasonably?)
> > assume /tmp is available.
>
> In particular, editors like vi. :-)
>
> --
> -Chuck
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list