You are not logged in.

#1 2011-04-20 19:50:56

BigZ
Member
Registered: 2010-06-07
Posts: 6

[Solved] tune2fs and df -i report contradictory used/free inode counts

Hi,

recently I started to backup remote directories with dirvish's (more specifically rsync's) capability to use hard links for files, that didn't change.

Out of curiosity I wanted to check the inode count on my home file system, so I ran tune2fs -l. But the reported number of used inodes seemed unreasonably low. The output of df -i shows a more plausible value.

df -i reports 223941 used inodes versus (14049280 - 13946144) = 103136 reported by tune2fs. I use ext4 (converted from ext3) for my home directory.

Does anybody know, where the difference in numbers comes from?

$ df -i
Dateisystem           INodes  IBenut.  IFrei IBen%% Eingehängt auf
udev                  498516    1151  497365    1% /dev
/dev/disk/by-uuid/c8e5a65c-36ca-4c89-a91a-763b6ab607b5
                     1556480  246931 1309549   16% /
shm                   507082       1  507081    1% /dev/shm
/dev/sda5              62336      33   62303    1% /boot
/dev/sda9             610800      75  610725    1% /tmp
/dev/sda10           1221600   17247 1204353    2% /var
/dev/sda8            14049280  223941 13825339    2% /home
/dev/sda11           3055616      13 3055603    1% /var/vms
$ /bin/su -c "tune2fs -l /dev/sda8"
Passwort: 
tune2fs 1.41.14 (22-Dec-2010)
Filesystem volume name:   home
Last mounted on:          /home
Filesystem UUID:          ebe2f9f2-de04-4226-9211-a4e3d8d83dff
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent sparse_super large_file uninit_bg
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              14049280
Block count:              56173272
Reserved block count:     2808662
Free blocks:              24402548
Free inodes:              13946144

Thanks in advance,
Flo

Last edited by BigZ (2011-04-21 07:32:16)

Offline

#2 2011-04-21 07:31:54

BigZ
Member
Registered: 2010-06-07
Posts: 6

Re: [Solved] tune2fs and df -i report contradictory used/free inode counts

Hi,

I tried google again with (again) different search terms and found the following mailing list thread, which states, that the inode count reported by tune2fs is not the live count and can only be considered correct, when the file system is unmounted. The developers recommend df -i for live purposes.

Thread on the ext3-users list about the topic

Sorry for the noise,
Flo

Offline

Board footer

Powered by FluxBB