Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!serv.hinet.net!spring.edu.tw!howland.erols.net!newspump.sol.net!newsfeeds.sol.net!uwm.edu!lll-winken.llnl.gov!fnnews.fnal.gov!nntp-server.caltech.edu!corvette.mst6.lanl.gov!newshost.lanl.gov!crs From: crs@lanl.gov (Charlie Sorsby) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Question about /tmp Date: 2 Jan 1997 18:22:28 GMT Organization: Los Alamos National Laboratory Lines: 57 Message-ID: <5agud4$6jr@newshost.lanl.gov> Reply-To: crs@hamlet.lanl.gov crs@swcp.com NNTP-Posting-Host: hamlet.lanl.gov Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33507 This began as a simple question but, as I asked, more and more possible complications suggested themselves to me--and I haven't even typed in all that I can think of. Perhaps the question that I should have asked is "What can I do to prevent /tmp from filling up my root file system?" Anyway, Since I've already typed it in, I'll leave the following for background, if nothing else. I have a question about /tmp. I'm running FreeBSD 2.1.5. My root file system is about 32MB. It seems possible that /tmp may, in some circumstances, fill up that file system, so I'd like to have /tmp effectively on a larger file system. But I don't want to have to reinstall everything in order to rearrange my file systems ( /, /dos, /home, /usr, /var, /proc ) so I can add one for /tmp. Suppose that I create /usr/tmp with the same modes as /tmp (i.e. drwxrwxrwt) and create a symbolic link to /tmp. First: Will this work or will it break something? One thing that I can foresee is that, when /usr isn't mounted (e.g. in single user mode) I'd have no /tmp. Is the only time the directory, /tmp, is created during the installation of the root file system? If so, this may not even be possible. I guess what I would have to do (it it is possible) is to mkdir /tmp very early on and, then, later in the boot process (e.g. just before /tmp is cleared) do something like "rm -rf /tmp && ln -s /usr/tmp /tmp" which would, clearly, specialize my system to one that will not have a separate partition mounted on /tmp. Second: Where should I create the link? In /etc/rc? Presumably, I should do so before the section of /etc/rc that clears /tmp. Will the existing code in /etc/rc still clear the now "bigger" /tmp? I know that in ordinary circumstances "rm -f Dir/*" where Dir is a symbolic link to an actual directory will remove files from the actual directory but I'm concerned that I'm overlooking something in this case, e.g. because of the "find" used to prevent removal of lost+found, et al, in the case that /tmp is a separate partition. Third: Is there a better way? Fourth: Or am I just being overly paranoid about the possibility that /tmp will, someday, fill up the root file system? Thanks for any help. I try to keep up with the news group but, just in case, could you Cc: any responses to either crs@swcp.com or crs@hamlet.lanl.gov, please? Just to make sure that I don't miss a valued response... -- Best, Charlie "Older than dirt" Sorsby "I'm the NRA!" crs@swcp.com crs@hamlet.lanl.gov Life Member since 1965