views:

138

answers:

2

Are the inode limits on Linux by subdirectory or by the entire file system? I use ububtu 64 bit server 9.10.

Can the inode limit be resolved by splitting files up into multiple sub directories if it's a directory limit?

+2  A: 

Inodes are the *nix representation of disk files. They are identified by a number, not by the path where they are in the directory structure. So the limit is across the whole file system, regardless of which hard link(s) (file entry you see in a directory) point(s) to the inode.

abc
How would one see the remaining inodes on a file system?
Mike Curry
Use `df -i` to get some statistics about inode usage in your filesystems.
Thomas Pornin
this prints inode stats: df -hi
abc
A: 

Generally, there is a limit to both. I saw a video of a presentation by someone from YouTube who talked about the day they ran into the per-directory file limit on ext2. Suddenly, nobody could upload to YouTube any more. They had to deepen their directory tree.

According to this doc, the limit is somewhere around 10k-15k files: http://www.mjmwired.net/kernel/Documentation/filesystems/ext2.txt

Of course, the limit depends on what filesystem you are using. I believe ReiserFS has much higher limits, for example.

Dietrich Epp