1
[~]$ stat -c %i /
2

As you can see in above, the inode for / is 2. But the First inode of /dev/sda2 is 11.

[~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             350G   67G  266G  21% /
tmpfs                  12G   44M   12G   1% /dev/shm

[~]$ sudo tune2fs -l /dev/sda2  | grep 'First inode'
First inode:              11

Can any one help me to understand this difference?

3

The value in the superblock shown by tune2fs is the first inode number usable for new files, while the root directory must always exist when the file system is created.

The kernel’s Ext4 documentation lists the inode numbers which are used internally by file systems features.

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.