Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Feb 2000 10:11:10 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Chip <chip@wiegand.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Disk is full message, how could this happen?
Message-ID:  <20000206101109.B16173@freebie.lemis.com>
In-Reply-To: <00020423330503.02757@chip.homenet>
References:  <00020423330503.02757@chip.homenet>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday,  4 February 2000 at 23:29:01 -0800, Chip wrote:
> I have had fbsd installed and running a little over a month, I installed as
> described in the Complete FreeBSD book, using a 100 meg partition for the root
> partition. Now I get the following error -
>
> Feb  4 23:26:41 chip /kernel: pid 4669 (kioslave), uid 0 on /: file system full
>
> chip# df
> Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
> /dev/wd1s1a     99183    98867    -7618   108%    /
> /dev/wd1s1f   2749566   590596  1939005    23%    /usr
> procfs              4        4        0   100%    /proc
> /dev/acd0c     659208   659208        0   100%    /dist
>
> How do rectify this problem? At least I have another disk set up to save file
> too. But 100 megs should be plenty shouldn't it, for the root partition?

As others have pointed out, you probably have /var on your root file
system.  You obviously didn't follow the book to the letter.  I
recommend a 32 MB root file system, which probably needs upgrading to
40 MB, but never to 100 MB.  I do, however, recommend not to have a
separate /var file system, and on page 87 I explain what you need to
do.  It's probably best to reboot after doing these steps.  I'm
appending a plain text version.

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 11, Making friends with FreeBSD, page 224, 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 11, Making friends
with  FreeBSD,  page  244, 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

--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


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?20000206101109.B16173>