On my Redhat 6.5, I get two different results on free inodes.

Using df :

[root@xxxx ~]# df -i /dev/mapper/data_vg-data_lv 
Filesystem                   Inodes IUsed   IFree IUse% Mounted on 
/dev/mapper/data_vg-data_lv 2555904 72422 2483482    3% /data/cfa000/x1/data 

Using tune2fs :

[root@xxxx ~]# tune2fs -l /dev/mapper/data_vg-data_lv | grep -i inode 
Inode count:              2555904 
Free inodes:              846816 

Can this situation be normal? If not, what could be the problem?

  • Are you 100% sure, that results come from the same node? And if, is your server updated to the latest erratas? – Jaroslav Kucera Nov 24 '17 at 9:11
  • I'm connected through ssh on this server so I'm sure. What do you mean by latest erratas please? – Pozinux Nov 24 '17 at 9:49

df should be correct. tune2fs inode count is not checking the superblock kept in memory so it's unreliable for mounted volumes. If you unmount /dev/mapper/data_vg-data_lv and check with tune2fs it should show the same values as df -i

  • Ok I'm going to unmount it and test later on. However, I have another server which is the same as this one with same FS mounted and both df -i and tune2fs -l show the same value. Also, the difference inode count seems so big. – Pozinux Nov 24 '17 at 12:15
  • Are you using different filesystems on the two servers? As I understand it the ext4 superblock is only written to disk when unmounting, but it's possible different filesystems update sooner. – HoD Nov 24 '17 at 15:10
  • No, only ext4 on both servers. Monday I will be able to unmount the FS (I cannot stop the application before) and test. – Pozinux Nov 24 '17 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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