Date: Wed, 22 Aug 2012 07:46:30 -0600 From: John Hein <jhein@symmetricom.com> To: Andy Wodfer <wodfer@gmail.com> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: /tmp filesystem full Message-ID: <20532.58038.689703.188732@gromit.timing.com> In-Reply-To: <CABgB0xTEkY7mqSaSS-8PjO-nsdkpmyaYXEg5s9rEjHXmRERvzA@mail.gmail.com> References: <CABgB0xTEkY7mqSaSS-8PjO-nsdkpmyaYXEg5s9rEjHXmRERvzA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Andy Wodfer wrote at 12:59 +0200 on Aug 22, 2012: > Hi, > I have about 500MB in my /tmp and it seems to be too small when the > periodic LOCATE script runs every week. > > What's the best way to increase the size of /tmp ? Could I simply remove it > and create a symbolic link ln -s to say /usr/tmp instead (where I have > several hundred GBs free)? > > PS! This is on a live server and I would like to keep downtime and > problems to a minimum. :-) One way is to work around your problem is to add 'TMPDIR=/path/to/bigger/filesystem' in /etc/crontab and/or 'export TMPDIR=/path/...' in /etc/periodic.conf. No downtime for that. But yes, you can make /tmp a sym link. You may have to worry about edge cases regarding booting (like if the filesystem you point to is not available early enough at boot time). In the typical case (e.g., locally mounted ufs), it should work fine. There may be very rare cases of software that gets confused by a sym link for /tmp, but certainly the stock periodic scripts should work with it. Depending on what processes have files open on /tmp, you may decide to use some down time to make the sym link. You can't use mv(1) to rename a mounted mount point. If you can umount /tmp, then you can rename it and make the sym link. But it's possible some processes have files open in /tmp preventing a normal umount (see lsof(8), fstat(1)). You would have to convince those processes to close the /tmp file descriptors.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20532.58038.689703.188732>