I have Ubuntu 11.10 Server 64bit. my clients upload a lot of small xml files on my server. and my business needs all of those files. I have storage space, but the problem is in inode size. by running df -ih and df -h, I get

df -ih
Filesystem               Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/vg0-lv0      4.7M    3.3M    1.5M   70% /
udev                     2.0M     475    2.0M    1% /dev
tmpfs                    2.0M     374    2.0M    1% /run
none                     2.0M       3    2.0M    1% /run/lock
none                     2.0M       1    2.0M    1% /run/shm
/dev/sda1                122K     232    122K    1% /boot
/dev/mapper/vg0-lv1      6.3M    600K    5.7M   10% /var
df -h
 df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg0-lv0   74G   40G   35G  54% /
udev                  7.9G  4.0K  7.9G   1% /dev
tmpfs                 3.2G  288K  3.2G   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                  7.9G     0  7.9G   0% /run/shm
/dev/sda1             228M   46M  171M  22% /boot
/dev/mapper/vg0-lv1   99G   40G   55G  43% /var

as you see, the root partition has about 50% free space while it has 30% free inode.
is there anyway to override this problem? can i resize or increase the indoe size. by the way, i have raised this lvm partition by 20G (lvresize) to get some free inodes for now!! but this is not a solution any idea about this is highly appreciated.

1 Answer 1


It's not possible to increase the number of inodes after the filesystem has been formatted. From the mke2fs manpage:

Be warned that it is not possible to expand the number of inodes on a filesystem after it is created, so be careful deciding the correct value for this parameter.

Your only option is to keep adding more space (which has the side effect of adding more inodes), or creating and migrating to a new filesystem with a lower bytes-per-inode ratio.

  • ext filesystem will not affect inode... this is what i know!! ext3 and ext4 gives one inode for every 16K... please correct me if i am wrong Feb 1, 2013 at 20:39
  • @AlaaAlomari The 16K is the default bytes-per-inode ratio, which can be set when the filesystem is created. If you can create a new filesystem and move your data there, you can use a lower bytes-per-inode ratio in order to have more inodes.
    – mgorven
    Feb 1, 2013 at 20:44
  • 1
    Thanks Mgorven,,, this partition is root partition!! so is it possible to create another partition and mount it as root in fstab?? if so, what shall i be aware of during this process? Thanks a lot for your help Feb 1, 2013 at 21:01
  • @AlaaAlomari, I'd mount another file system with more inodes to the place where all the small files are, and leave the root file system alone (maybe shrink it to make space for the other file system). The main reason people use separate file systems in different mount points is so they can tune them differently. Usenet servers typically have /var/spool with one inode per 4k, for example. The Debian installer in Expert mode asks for the expected usage (spool, normal, archive) and adjusts the number of inodes to one per (1k, 16k, 4M). Mar 17, 2021 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .