1

When I use the dumpe2fs command to look at the Block Group of the ext4 filesystem, I see "free inodes" and "unused inodes".

I want to know the difference between them ?

Why do they have different values in Group 0 ?

Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
  Checksum 0xd1a1, unused inodes 0
  Primary superblock at 0, Group descriptors at 1-3
  Reserved GDT blocks at 4-350
  Block bitmap at 351 (+351), Inode bitmap at 367 (+367)
  Inode table at 383-892 (+383)
  12 free blocks, 1 free inodes, 1088 directories
  Free blocks: 9564, 12379-12380, 12401-12408, 12411
  Free inodes: 168
Group 1: (Blocks 32768-65535) [ITABLE_ZEROED]
  Checksum 0x0432, unused inodes 0
  Backup superblock at 32768, Group descriptors at 32769-32771
  Reserved GDT blocks at 32772-33118
  Block bitmap at 352 (+4294934880), Inode bitmap at 368 (+4294934896)
  Inode table at 893-1402 (+4294935421)
  30 free blocks, 0 free inodes, 420 directories
  Free blocks: 37379-37384, 37386-37397, 42822-42823, 42856-42859, 42954-42955, 44946-44947, 45014-45015
  Free inodes:

1 Answer 1

2

The "unused inodes" reported are inodes at the end of the inode table for each group that have never been used in the lifetime of the filesystem, so e2fsck does not need to scan them during repair. This can speed up e2fsck pass-1 scanning significantly.

The "free inodes" are the current unallocated inodes in the group. This number includes the "unused inodes" number, so that they will still be used if there are many (typically very small) inodes allocated in a single group.

1
  • the funny thing is if you use lots of inodes your unused inodes will be equal zero. if then you delete lots of files you'll get lots of free inodes. However e2fsck will be checking them anyway. So you will have a disk with a few files but checking time will be devastating.
    – Alex
    Commented Jul 11, 2023 at 8:34

You must log in to answer this question.

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