This article shows you how I dealt with an "out of inodes" problem. I was installing the entire ports tree on a new box. It froze. So I restarted it. Then it froze again. OK, this time I noticed the following messages on the console: Jul 5 14:25:48 little /kernel: pid 431 (cpio), uid 0 on /usr2: |
inode background |
The problem is that we didn't have enough inodes. This is a common problem when you have many files of a small size. If you look at the man page for newfs, you'll see the following:-f frag-size As you can read, with lots of small files, you'll quickly use up the inodes. When you install the ports system, you are adding lots of small files. |
Create a new file system |
Here's how I created a new file system. Note that this removes all files from the device. Make a backup first if you wish to retain anything. In the message log, it mentions /usr2. If you look the output from mount, you can see what device is out of inodes. The default value for inodes is 4096. So by specifying 1024 below, I have effectively increased the number of inodes by a factor of 4. In order words, we can now have four times as many files as we used to have. We'll use this as a starting point and see how it goes. # mount You can see that /usr2 is actually /dev/wd1s1e. So that's the device which needs to be modified. On my file system, /usr2 contained only the ports directory. # umount /dev/wd1s1e The next step is to recreate my symbolic links back to /usr/ports: # cd /usr2 |
Monday, September 24, 2007
Out of inodes
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment