Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 22:46:47 -0500
From:      Bob Johnson <bob89@bobj.org>
To:        freebsd-questions@freebsd.org
Cc:        Ron Joordens <ron.joordens@indec.com.au>
Subject:   Re: /root file system full
Message-ID:  <200403032246.47216.bob89@bobj.org>
In-Reply-To: <11F383396235D511994B00A0C9E175377211FB@INDEC-NTSERVER>
References:  <11F383396235D511994B00A0C9E175377211FB@INDEC-NTSERVER>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 03 March 2004 04:51 pm, Ron Joordens <Ron Joordens 
<ron.joordens@indec.com.au>> wrote:
> Good Morning,
>
[...]
> My / filesystem is full. 109%. I want to know what is on the /
> filesystem, what I can get rid of, how to get rid of it and how to
> make sure that it doesn't happen again.
>
> Any thoughts?
>

The / filesystem contains all of the other filesystems, either directly, 
or as mountpoints where other filesystems are mounted.  But filesystems 
being mounted under / would not cause an error message that says / is 
full, so your first task is to figure out how things are configured on  
your system (I don't know what the default configuration is these days, 
or whether you used the defaults).

As someone pointed out already, this information is obtained with the 
"df" command.  If you can post the output of that will narrow down the 
possibilities.

> For background information:
>
> The / filesystem is the suggested default of 128mb. The handbook says
> that root is generally about 40mb of data and that 100mb should be
> enough to allow for future expansion needs, so 128mb should be
> adequate.
>
> During installation I installed everything, sources, ports,
> documentation, etc.
>

My experience is that the suggested defaults are enough to get a basic 
system going, but tend to be a bit tight for a system on which you are 
going to install a lot of stuff and/or use for a long time.

My own rule of thumb is to double all of the defaults, and have at least 
3 GB for /usr on a workstation where a lot of miscellaneous programs 
are likely to be installed.  My laptop has 4.6GB in /usr, and it's 90% 
full (but almost 1 GB of that is stuff I stored there temporarily).
  
When you are first learning FreeBSD (or any *nix), there is something to 
be said for putting EVERYTHING in one partition (/), and using du to 
check to see how much /var, /usr, /tmp, /home, etc. are using once in a 
while.  Eventually you will have a good idea of what your real needs 
are, and around that time you will be ready to clean everything up by 
wiping the system and doing a fresh install.  Of course, you will need 
to figure out where to temporarily store /home and any important 
configuration files while you do the new installation.  My prefered 
method is to just buy a new, larger hard drive and keep the old one 
around as a backup.

> I have CVSuped source to RELENG_4_9.
>
> I have CVSuped ports.
>
> I have recompiled the kernel 3 or 4 times.
>
> I have redirected the /tmp directory to /usr/tmp  (these locations
> are from memory but you get the idea)
>
> I got a bit carried away installing ports during installation (a kid
> in a candy store?) and currently have about 206 installed.
>
> I have been updating ports recently using portupgrade with the
> recursive switches -rR.
>
> At the time the first filesystem full error message was seen I was
> portupgrading arts -Rr which was upgrading a lot of other ports as
> well. That process stopped with an error message stating that a
> conflict between xfmail and qt existed and that qt could not be
> upgraded untill xfmail was deinstalled so there may be a lot of
> working data still on the system. Would that be on root?
>

The working files for the most part should be in /usr/ports, although I 
believe some are also in /tmp (that may be your problem).  You should 
be able to delete the contents of /tmp without harm, particularly if 
you do it while shut down to single user mode, but /usr/tmp is supposed 
to persist across reboots and some things may get slightly confused 
when you delete their temp files. Slight confusion is certainly better 
than a dead system, though.

The timing of the error messages also suggests the possibility that /var 
is part of / rather than being a separate filesystem, and that either 
the ports database and/or the log files are eating a large chunk of 
your space.  If that is the case, it might be prudent to consider it a 
learning experience and start over.  If necessary (and assuming that 
really is the problem), you can resurrect the system by some 
combination of deleting old logs, uninstalling unneeded ports, moving 
directories to other partitions and using symlinks (soft links) to make 
them appear in the right place, and don't forget to go back and delete 
old kernels you don't need any more if you are saving some of them 
"just in case".

> Thanks for your help,
>
> Ron Joordens
> Melbourne, Australia
>

Good luck,

- Bob



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403032246.47216.bob89>