Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Linux MIPS router with 2.4.17 kernel. Root fs is a tmpfs and /rom is a cramfs. There is 4MB free memory and 3MB free on tmpfs.

I can create a few new empty files, but the next ones fail with "not enough space". However, I can append 1MB of data to an existing file. So my trouble is in inode count.

And my questions:

  1. Is there any way to dynamically increase inodes?
  2. If I can't increase it dynamically - Where can I increase it in kernel sources?
share|improve this question
What does df -i say? – womble Nov 17 '09 at 14:42
df in busybox does not have -i option – vlad Nov 17 '09 at 14:53
vlad: What about the stat command, is there a stat command that supports -f option? then just stat -f <mountpoint> . If not and you can bang out some c and cross compile to mips, you can maybe use the statfs() or family calls yourself? – Kyle Brandt Nov 17 '09 at 15:18
up vote 4 down vote accepted

If the inode count is your actual issue, you can increase the amount of available inodes for the tmpfs filesystem with the nr_inodes mount option. If you set nr_inodes=0 , then there will be unlimited inodes.

All this information is in the tmpfs kernel documentation.

See womble's answer for remount example. For boot, you will need to edit your fstab, or whatever does this for your particular Linux build so future mounts are handled correctly.

share|improve this answer
yes, it helps. thanks – vlad Nov 17 '09 at 14:52

You can set the number of inodes available in a tmpfs with the nr_inodes mount option. To do this live, you can just run:

mount -o remount,nr_inodes=<bignum> /tmp

I suspect that setting this number very, very large will result in a lot of memory consumption, so be careful.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.