Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
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 –  Alaa Alomari Feb 1 '13 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 '13 at 20:44
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 –  Alaa Alomari Feb 1 '13 at 21:01
add comment

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.