Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6776021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:58:34+00:00 2026-05-26T15:58:34+00:00

I have several questions on how inode number is used in linux filesystem. These

  • 0

I have several questions on how inode number is used in linux filesystem. These questions may be related but for clearness I will ask them one by one.

Q1: Take EXT2/3 for example, from “Design and Implementation of the Second Extended Filesystem” I know that there are inode tables in block groups, and I know inode presents file, but what if there are too many files but the inode numbers are not enough?
My best guess is that filesystem does nothing if all its inode numbers were exhausted. And if some file get deleted later, its inode may be recycled.

Q2: I run “df -i” on my Linux server and I get this:

Filesystem            Inodes       IUsed   IFree      IUse% Mounted on    
    /dev/sda1          1313280    7853 1305427    1%     /
    devtmpfs                   0       0       0              -       /dev
    tmpfs                 525298       4  525294        1%    /dev/shm
    /dev/sda2              65808      50   65758       1%    /boot
    /dev/sda5            1313280     146 1313134    1%   /opt
    /dev/sda6             655776      37  655739      1%   /tmp
    /dev/sda7             655776    5219  650557    1%   /home
    /dev/sda8            1313280     840 1312440    1%  /var
    /dev/sda9             655776   36529  619247    6%  /usr
    /dev/sda10              6432      11    6421        1%  /crash
    /dev/sda12            135488      11  135477     1%  /usr/local/instances
    tmpfs                 525298       3  525295    1% /var/run/xenstored
    tmpfs                 525298       3  525295    1% /var/lib/xenstored
    tmpfs                 525298       3  525295    1% /var/lib/xend/socket
    tmpfs                 517536       3  517533    1% /var/run/libvirt/socket

I see that each filesystem has its own inode counts and these filesystems (like devtmpfs and tmpfs) are all mounted to root file system. I guess each filesystem have their own inode tables, but are inode numbers of different filesystems distributed in different ranges, like root filesystem is [0, N] and tmpfs is [N+1, M]?

If inode numbers of different filesystems are in different ranges (which I don’t think so), how filesystems make an agreement on range division?

If inode numbers of different filesystems are generated based on the same rule (like all start from 0), can different filesystems conflict if we mount them together? As I know, inode presents files in running OS, what the OS will do if a file in root filesystem has inode number N and another file in another filesystem (like tmpfs) also has the inode number N?

PS. I’m kind of new to Linux and I’m not coming from a English-speaking country, sorry for if I didnot make clear expression. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:58:35+00:00Added an answer on May 26, 2026 at 3:58 pm

    The full unique identifier for a file is (st_dev, st_ino). This means that inode numbers do not have to be unique across filesystems and every file is still uniquely identified.

    This is why you cannot have hardlinks that cross devices. Directory entries only contain an inode number, not a device number. So directory entries can only refer to files on the same filesystem as the directory is on.

    Even if you added a device field to the directory entry, it would be meaningless and device numbers can change when you add or remove drives and only refer to a particular device while a system is running. Also, how would you uniquely number all of the devices in the entire world. With USB drives, for example, you can take a given device from machine to machine. How would you ensure the device numbers stayed the same so the links still worked?

    Lastly, not all filesystem types have a fixed quantity of inode numbers. reiserfs and (I believe) btrfs dynamically allocate new inodes as needed, and so the total inodes field of the filesystem doesn’t really reflect any sort of useful value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several questions: 1. What's the difference between isoMDS and cmdscale? 2. May
Have several questions. Don't flame me - I'm newbie, but eager to know more.
I have several questions regarding forms and PHP but if I should put them
I've read about 20 topics about index performance, but still have several questions... Would
I have several questions about the PE subsystem field, which may overlap to some
I have several questions to ask that pertains to data position and alignment in
I have just discovered the joy of bitflags. I have several questions related to
The basic idea is to have several questions, but only 1 showing randomly on
I have asked several questions about making links on images in matlab, but I
I have several questions regarding filenames and the iPod Library. I understand I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.