An inode limit is the maximum number of inodes, and therefore files, directories and symbolic links, that a file system or a hosting account may contain, regardless of how much disk space remains free. Among server resources it is the constraint administrators most often overlook, because a disk can be only half full and still refuse new files once every inode is allocated.
On Linux servers the limit appears in two forms: a hard ceiling fixed when the file system is created, and an administrative quota that a hosting provider or administrator assigns to a user or account. Monitoring inode usage alongside disk space is therefore a routine part of capacity planning in shared hosting and container platforms.
What an inode stores and why the count is finite
An inode is a metadata record that describes one file system object: its type, permissions, owner, timestamps, size and the pointers to the data blocks that hold its content. The file name is not stored in the inode; it lives in a directory entry that maps the name to an inode number, which is why hard links can give one inode several names.
Every object consumes exactly one inode, no matter how small it is. A one-byte cache file and a 4 GB video archive each occupy one slot in the inode table, so workloads with millions of tiny files exhaust inodes long before they exhaust capacity.
The count is finite because classic file systems such as ext4 preallocate the inode table at format time. The mkfs.ext4 tool derives the number from the bytes-per-inode ratio, by default one inode per 16 KiB of space, and that number cannot be raised later without reformatting. Newer designs allocate inodes dynamically, which changes where the ceiling comes from.
The following table compares how common Linux file systems handle the inode ceiling.
| File system | Inode allocation | Can the ceiling grow | Practical implication |
|---|---|---|---|
| ext4 | Fixed table at format time | No, only by reformatting | Choose the ratio carefully for small-file workloads |
| XFS | Dynamic, capped by imaxpct | Yes, by raising the percentage | Rarely exhausted in practice |
| Btrfs | Dynamic in metadata chunks | Yes, while metadata space exists | Exhaustion appears as metadata full |
| ZFS | Dynamic per object | Yes, bounded by pool space | Reports a very large theoretical count |
Physical ceilings and account quotas
The term covers two different mechanisms that produce the same symptom. The physical inode ceiling belongs to the file system as a whole, while an inode quota is a policy that restricts one user, group or project to a share of that total.
Shared hosting providers commonly publish account limits between 100,000 and 500,000 inodes, with soft warnings shown in the control panel before the hard cap applies. Linux disk quotas implement this with a soft limit and a hard limit: exceeding the soft limit starts a grace period, typically seven days, after which writes fail even below the hard limit.
The table below separates the forms of the limit an administrator may encounter.
| Form | Set by | Scope | Typical behavior when reached |
|---|---|---|---|
| File system ceiling | Format parameters | Entire volume | Every write that creates an object fails |
| Hard quota | Administrator or provider | One user, group or project | Only that account receives errors |
| Soft quota | Administrator or provider | One user, group or project | Warning, then failure after the grace period |
| Container or overlay limit | Storage driver settings | One container layer | Image builds or applications fail inside the container |
Diagnosing inode exhaustion
Inode exhaustion is diagnosed by comparing inode usage with space usage. The command df -i lists total, used and free inodes for each mounted file system; a value of 100% in the IUse column while df -h still shows free gigabytes confirms the cause.
The characteristic error is No space left on device (ENOSPC), the same message produced by a full disk, which is why the problem is frequently misdiagnosed. Applications respond in indirect ways: sessions stop saving, mail queues stall, package managers abort and logs stop rotating.
To locate the offending directories, administrators count objects per directory with du --inodes or a find pipeline sorted by count. The usual culprits are session directories, cache folders, mail queues and unpruned backups.
This table maps typical symptoms to their likely source and a corrective step.
| Symptom | Likely cause | Corrective action |
|---|---|---|
| PHP sessions fail to save | Millions of stale session files | Enable session garbage collection or move sessions to memory |
| CMS cache grows without bound | Page or thumbnail cache never purged | Schedule cache cleanup and set expiry |
| Mail delivery stops | Unbounded maildir or spam folder | Apply retention rules and empty old folders |
| Backups fail midway | Old local archives kept as loose files | Store compressed archives off the server |
| Container builds abort | Many small layers on overlay storage | Prune unused images and build cache |
How the inode limit relates to other server resources
The inode limit is one of several independent resource ceilings on a server, and reaching any one of them stops work even when the others have headroom. It is most often confused with disk space, because both surface as storage errors, and with open file descriptors, because both involve files.
| Limit | What it counts | Typical failure | Check with |
|---|---|---|---|
| Inode limit | Existing files and directories | Cannot create new files | df -i |
| Disk space | Bytes of stored data | Cannot write more data | df -h |
| Open file descriptors | Files currently open by processes | Too many open files | ulimit -n |
| Process limit | Simultaneous processes per account | Cannot fork new processes | ulimit -u |
The distinction matters for remediation: deleting one large file frees space but only one inode, while removing a directory of 200,000 thumbnails frees 200,000 inodes and almost no space.
Planning and preventing inode problems
Prevention starts at file system design. A volume intended for mail spools, package caches or object-heavy workloads should be formatted with a lower bytes-per-inode ratio, for example -i 4096, or use a file system with dynamic allocation such as XFS.
- Monitor inode usage with the same alert thresholds as disk space, commonly a warning at 80% and a critical alert at 90%.
- Automate cleanup of sessions, temporary files and caches with scheduled jobs or built-in expiry.
- Move high-churn small objects to memory stores or databases instead of individual files.
- Archive rather than accumulate: one compressed archive replaces thousands of loose files.
- Review quota reports before migrations, because restoring a backup can exceed a destination account limit.
A common misconception is that upgrading disk size solves the problem. On ext4 that helps only if the larger volume is newly formatted; growing an existing ext4 volume adds inodes in proportion to the added block groups, and a hosting quota stays unchanged until the provider raises it.
Stripped to the essentials
Think of a storage drive as a library with shelves and a card catalog. The shelves hold the books, and the catalog has one card for every book. If the catalog runs out of cards, the library cannot accept another book, even with empty shelves.
An inode is that catalog card, and the inode limit is the number of cards available. Every file, however tiny, needs its own card. Many small files can use up all the cards while plenty of storage space remains. The fix is to remove files you no longer need, especially old cache and temporary files, or to get a larger allowance.
Where it is applied
A small agency hosts a busy online store on a shared hosting account with 50 GB of disk space and a 250,000-inode quota. One morning customers report that carts empty themselves and the administrator cannot upload product photos. The control panel shows only 18 GB in use, yet df -i inside the account reports 100% inode usage.
Counting files per directory reveals about 190,000 expired session files and 40,000 thumbnails generated for products that no longer exist. The administrator deletes the stale files, enables session garbage collection, moves sessions to a memory store and schedules a weekly cache purge. Inode usage drops to 22%, the store recovers within minutes and a new alert at 80% now warns the agency weeks before the quota is reached again.