Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2001 20:35:54 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        dan_mclean@mlc.com.au
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: i-node problems
Message-ID:  <Pine.BSF.4.21.0107262024020.62016-100000@ren.sasknow.com>
In-Reply-To: <OFE35321D9.FB05B523-ONCA256A96.000BBFB3@mlc.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
dan_mclean@mlc.com.au wrote to freebsd-questions@FreeBSD.ORG:

> I have just installed 4.3 on a 40Gb hard disk (I was sick of not being
> able to run latex).
> 
> I keep getting an error "out of i-nodes" which I guess means that my
> /var partition is filling up. This is because I used the suggested
> partition size in the disk set up part of the install so only have
> 20Mb for /var and 39Gb for /usr (ok I know how dumb that is now).

There are basically two ways a UNIX partition can fill up.

One is to run out of blocks/frags (i.e., run out of space)

The other way, as you have encountered, is to run out of i-nodes (i.e.,
use up all available directory entries by creating too many files)

It is possible, when running newfs even on a small drive, to allocate more
i-nodes with a higher value for the -i switch. By default, one i-node is
allocated for every 4 frags (i.e., one i-node for every 4K, or, on a 20MB
HD, approximately 5120 i-nodes). So, if you have more than about 5K files,
plus 3 entries for every directory, you'll run out. Not suprising on /var,
which usually contains a lot of small files (/var on this machine contains
about 80K inodes, and that's not very many). However, the i-node limit is
not easily changed on a partition that already exists.

You can indeed symlink some portions of /var to other filesystems. It is
generally a good idea to set this up in single-user mode if you can,
because many daemons and applications lock files in /var. This is the
easiest solution, but perhaps not the best long-term.

If you want to re-create /var larger, you may be in for a headache, as in
your case, it sounds like you will have to shrink /usr. There is no
"right" way to do this... many people would simply elect to re-install the
OS and re-partition the drives from scratch during the process. If this is
not an option, you can always add more drives to the system, or do a dump
of each filesystem to a spare drive/tape backup, repartition/newfs/relabel
everything, and restore the files on the resized drives.

Hope this helps! (I know it wasn't exactly good news ;-)

- Ryan


> Here are my questions
> 
> 1. Can I link the /var/db/pkg files to somewhere on my /usr partition?
> 
> 2. Can I repatriation the /var some how to be say 100Mb ??
> 
> Thanks in advance.
> 
> Dan McLean
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


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?Pine.BSF.4.21.0107262024020.62016-100000>