/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Chris Studhol » Sat, 07 Nov 1998 04:00:00



What do people think about doing this:

  ln -s /tmp /var/tmp

to help prevent /var from filling up when someone vi's a huge file.

Alternatively, on a Linux box, what do people think about:

  ln -s /var/tmp /tmp

where /var is a seperate partition.  Any problem with /tmp not being available
immediately at boot?  I suppose that if you boot to single user mode, the
first thing you have to do is either mount /var or create /var/tmp.

Chris.

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Peter Ben » Sat, 07 Nov 1998 04:00:00




>What do people think about doing this:

>  ln -s /tmp /var/tmp

>to help prevent /var from filling up when someone vi's a huge file.

It's a common configuration, and I've never seen it cause any problems.

Watch out when doing it the other way around, ie. ln -s /var/tmp /tmp.
Solaris 1 cleans out /tmp using 'cd /tmp; rm -f - *', so if /tmp is not
available, it removes vmunix and the symlinks for /bin and /lib.

Quote:>Alternatively, on a Linux box, what do people think about:

>  ln -s /var/tmp /tmp

>where /var is a seperate partition.  Any problem with /tmp not being available
>immediately at boot?

No problem. Nothing it written to any filesystem, including /tmp,
until all local filesystems are mounted and / is remounted read/write.

Peter

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Frank Cusac » Sat, 07 Nov 1998 04:00:00





> >What do people think about doing this:

> >  ln -s /tmp /var/tmp

> >to help prevent /var from filling up when someone vi's a huge file.

> It's a common configuration, and I've never seen it cause any problems.

Except that /var/tmp is meant for temp data that should be persistent
across system failures [eg vi -r]. If you point it to /tmp you
probably wipe it out during reboot.

~frank

--
Frank Cusack       + Today's Haiku   No keyboard present
Icon CMT Corp.     + error message:  Hit F1 to continue
PGP: C001AA75      +                 Zen engineering?

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Chris Thomps » Sat, 07 Nov 1998 04:00:00




>What do people think about doing this:

>  ln -s /tmp /var/tmp

>to help prevent /var from filling up when someone vi's a huge file.

Regardless of the exact technique used, it's a very good idea to seperate
/var/tmp from /var on a multi-user system.

In SunOS4 [when tmpfs was still shaky] we used to have /tmp a ufs filing
system, and /var/tmp a symlink to /tmp/var, making sure that the latter
directory never went away. This was to ensure distinct namespaces.

In Solaris 2, we have /tmp a tmpfs filing system [size-limited: another
good idea in a multi-user system] and /var/tmp a ufs filing system seperate
from /var. If you are happy to lose /var/tmp on a reboot [with the
implications for "vi -r" mentioned in another post] then it's just as
easy to make it a second tmpfs filing system as to make it a symlink
into /tmp.

Chris Thompson
Email: cet1 [at] cam.ac.uk

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Chris Studhol » Wed, 11 Nov 1998 04:00:00





>>What do people think about doing this:

>>  ln -s /tmp /var/tmp

>>to help prevent /var from filling up when someone vi's a huge file.

>Watch out when doing it the other way around, ie. ln -s /var/tmp /tmp.
>Solaris 1 cleans out /tmp using 'cd /tmp; rm -f - *', so if /tmp is not
>available, it removes vmunix and the symlinks for /bin and /lib.

Couldn't this be avoided by creating /var/tmp before /var is mounted?  This
would ensure that /tmp is always available, but in extreme circumstances, you
could 'hide' some disk space if /var/tmp is not empty when you mount /var.

Chris.

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Chris Studhol » Wed, 11 Nov 1998 04:00:00






>> What do people think about doing this:

>>   ln -s /tmp /var/tmp

>> to help prevent /var from filling up when someone vi's a huge file.
>[snip]

>if you have problems with user(s) editing huge files tell them about
>the vi directive 'set dir=<FS with enough space to hold the vi temp file>'.

My users have been told to not edit huge files with vi.  They are not always
easy to teach, but that is their problem.  I was asking about the symbolic
link because it simplifies administration in general (one less tmp dir to
worry about filling and having to clean).  On a non-Solaris machine,
`ls -s /var/tmp /tmp` makes sense when /var is mounted seperate from /.

Chris.

 
 
 

/var/tmp -> /tmp (was: Anything wrong with just two disk partitions?)

Post by Richard L. Hamilt » Thu, 12 Nov 1998 04:00:00


If you put
   EXINIT="set dir=$HOME";export EXINIT
in your .profile, or for die-hard csh users,
   setenv EXINIT "set dir=$HOME"
in your .login, then vi should create temporary files in your home
directory rather than in /var/tmp.







>>> What do people think about doing this:

>>>   ln -s /tmp /var/tmp

>>> to help prevent /var from filling up when someone vi's a huge file.
>>[snip]

>>if you have problems with user(s) editing huge files tell them about
>>the vi directive 'set dir=<FS with enough space to hold the vi temp file>'.

> My users have been told to not edit huge files with vi.  They are not always
> easy to teach, but that is their problem.  I was asking about the symbolic
> link because it simplifies administration in general (one less tmp dir to
> worry about filling and having to clean).  On a non-Solaris machine,
> `ls -s /var/tmp /tmp` makes sense when /var is mounted seperate from /.

> Chris.

--
ftp> get |fortune
377 I/O error: smart remark generator failed

Bogonics: the primary language inside the Beltway


 
 
 

1. /tmp vs /usr/tmp vs /var/tmp



:Please help me understand temp directories.  I know what /tmp is for,
:and I know that /var/tmp is like /tmp only it is not normally cleared
:at boot-time.  But then what is /usr/tmp for?  or aren't /usr/tmp and
:/var/tmp usually used in the same implementation?

/usr/tmp and /var aren't normally in the same implementation.  

--

 InterNIC WHOIS: MJO | (has my PGP & Geek Code info) | Phone: +1 248-848-4481

2. K6-2 300 Problem

3. dangers of linking /var/tmp -> /tmp

4. Restricting masquerading

5. How to limit the use of /tmp and /var/tmp by arbitrary users

6. Slackware 3.4 on a second hard drive living next to OSR2

7. Why is there /tmp in addition to /var/tmp.

8. HP Laserjet 6Lse

9. Permissions on /tmp or /var/tmp?

10. difference between /tmp and /var/tmp?

11. Permissions on /tmp or /var/tmp?

12. mfs & /tmp vs /var/tmp

13. /tmp & /var/tmp sizes?