Date: Thu, 1 Oct 1998 18:16:43 +0930 From: Greg Lehey <grog@lemis.com> To: "p.roberts-davies" <p.roberts-davies@swansea.ac.uk>, freebsd-questions@FreeBSD.ORG Subject: Re: / partition Message-ID: <19981001181643.A24146@freebie.lemis.com> In-Reply-To: <3613E37A.A1134493@swansea.ac.uk>; from p.roberts-davies on Thu, Oct 01, 1998 at 09:18:02PM %2B0100 References: <3613E37A.A1134493@swansea.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, 1 October 1998 at 21:18:02 +0100, p.roberts-davies wrote: > I'm using FreeBSD 2.2.7. with Samba, Apache and Appletalk mainly as a > mail server for approx 30 users. > The / partition 31Mb keeps overflowing although there is no significant > increase in disk file storage. I'm not sure what you're trying to say here. If there's no significant increase, you won't overflow. > Apart from deleting the occasional xses.errors/root file approx15 Mb, > which doesn't seem to release any of the / file system, the only way of > reclaiming storage at present is a reboot. i.e. / 108% before and / 45% > after. > Can I maybe increase the / partition without a full rebuild? No, sorry, you can't do that. I'd guess that you're filling up your /tmp file system, or that you don't have a separate /var/tmp file system, and you're filling that up. In either case, you should consider moving the directories to /usr and putting in a symlink. I'm appending an extract from "The Complete FreeBSD", second edition (http://www.cdrom.com/titles/os/bsdbook2.htm). Greg ---------------------------------------------------------------------- Where to put /var and /tmp __________________________ Now the installation is completed, but you may still have some housekeeping to do. Did you include a /var file system on your disk? In the example, we didn't. If we don't specify anything else, /var will end up on the root file system, which isn't enormous. If we leave things like that, there's a very good chance that the root file system will fill up. We solve this problem by creating a directory /usr/var and a symbolic link /var which points to /usr/var: # mkdir /usr/var create a new directory # cd /var move to the old /var directory # tar cf - . | (cd /usr/var; tar xf - ) copy its contents # cd / get out of the directory # rm -rf /var and remove it # ln -s /usr/var /var now link to the new directory After performing these steps, you might see messages like: Jan 9 13:15:00 myname syslogd: /var/run/utmp: no such file or directory syslogd is the System Log daemon. [1] Don't worry about these messages. If you're intending to restart the system soon, just wait until then and the messages will go away. Otherwise you can restart syslogd: # ps waux | grep syslogd look for the syslog daemon root 152 11.0 1.6 176 476 v0 D+ 1:16M 0:00.15 grep syslogd root 58 0.0 1.1 184 332 ?? Ds 1:13 0:00:57 syslogd # kill -9 58 stop the PID of syslogd # syslogd and start it again The PID of the syslogd is the second field on the line which ends with just syslogd. The first line is the process which is looking for the text syslogd. See Chapter 10, Making friends with FreeBSD, page 190, for more information on stopping processes. Programs should not write large files to /tmp; if a program needs to create a large temporary file, it should create it in /var/tmp. Unfortunately, the location of the temporary files is not usually in your hands. It would be tempting to also replace /tmp with a symbolic link to /var/tmp, but the system handles /tmp and /var/tmp slightly differently: after a reboot, it removes all files from /tmp, but it leaves the files in /var/tmp. You can solve this problem by creating a directory /usr/tmp and creating a link to it. Perform the following steps in single-user mode (see Chapter 10, Making friends with FreeBSD, page 191, for a description of single user mode and how to get into it). # mkdir /usr/tmp create a new directory # rm -rf /tmp and remove the old /tmp # ln -s /usr/tmp /tmp now link to the new directory -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981001181643.A24146>