# Inode and disk quota limits explained

> What an inode limit on hosting is, why you can run out of inodes with free disk space, the commands to find inode-heavy folders, and how disk quotas enforce it.

Source: https://zopanel.net/blog/inode-disk-quota-limits  
Updated: 2026-10-21

## Key takeaways

- An inode is the record a Linux filesystem keeps for each file and folder, so an inode limit is a limit on how many files you can have.
- A disk can run out of inodes while showing free space, and then no new file can be created, which breaks uploads, sessions and caches.
- du --inodes and find show which folders hold the most files; caches, PHP sessions, node_modules and mail are the usual culprits.
- Hosts enforce disk and inode limits per account with filesystem quotas; without quotas, one account can fill the disk for everyone.

An inode limit on hosting is a cap on how many files and folders your account may own, because every file and folder on a Linux filesystem uses one inode. When you hit it, nothing new can be created, not even a tiny cache file, even though your disk space usage may be far from full. To fix it, find the folders with the most files (`du --inodes` does this), then clean up caches, old sessions, backups and unused dependencies.

This article explains what inodes are, why they run out, the exact commands to find inode-heavy folders, and how hosting providers enforce disk and inode limits with quotas. For CPU, RAM and process limits, see our separate guide to [hosting resource limits](/blog/hosting-resource-limits).

## What is an inode?

An inode is the small record a Linux filesystem keeps for each file, folder and symbolic link. It stores the owner, permissions, size, timestamps and where the data lives on the disk; the file name is stored in the folder that contains it. One file uses one inode whatever its size, so a 4 GB video and a 40-byte cache file cost the same: one inode.

You can see a file's inode number with `ls -i`, and the filesystem's totals with:

```bash
df -i
```

The `IUsed` and `IFree` columns are inodes, and `IUse%` is how close the filesystem is to running out.

## Why can you run out of inodes with free disk space?

Because on the most common Linux filesystem, ext4, the number of inodes is fixed when the filesystem is created. The `mke2fs` [manual](https://man7.org/linux/man-pages/man8/mke2fs.8.html) explains that it creates one inode for every *bytes-per-inode* bytes of space, and that this ratio cannot be changed afterwards. The example configuration in [mke2fs.conf](https://man7.org/linux/man-pages/man5/mke2fs.conf.5.html) uses 16,384 bytes per inode by default, which gives an 80 GB disk roughly five million inodes.

Five million sounds like a lot until a site creates millions of files of a few hundred bytes each. Then the inodes are gone while most of the space is still free. XFS behaves differently: it allocates inodes as needed, up to a maximum share of the space (25% by default on filesystems under 1 TB, according to the [mkfs.xfs manual](https://man7.org/linux/man-pages/man8/mkfs.xfs.8.html)), so it rarely runs out this way.

On shared hosting there is a second, smaller ceiling: your account's **inode quota**. A host might give each plan a certain number of files so one account cannot exhaust the whole filesystem. As Hostinger's [inode limit help page](https://www.hostinger.com/support/1583210-what-is-inode-limit/) puts it, once the limit is reached you cannot create new files or directories, even if you have disk space available.

## What breaks when inodes run out

| Symptom | Why |
| --- | --- |
| Uploads fail in WordPress or the file manager | The uploaded file cannot be created |
| Users logged out, carts emptied | PHP cannot write new session files |
| "No space left on device" with free space in `df -h` | The error is the same for blocks and inodes; `df -i` shows which |
| Cache plugin stops working or the site slows down | New cache files cannot be written |
| Backups fail or are incomplete | The archive or temporary files cannot be created |
| Mail stops arriving in a mailbox | With Maildir storage, each message is one file |

The "No space left on device" message is the confusing one. Always run `df -h` and `df -i` together before you start deleting large files.

## How to find inode-heavy folders

Run these as the account user (or as root for the whole server). Replace `~` with the folder you want to inspect.

**Count files per top-level folder** (GNU coreutils `du` supports `--inodes`):

```bash
du --inodes -d 1 ~ 2>/dev/null | sort -n | tail -15
```

Then go one level deeper into the biggest result, and repeat until you reach the folder that is filling up:

```bash
du --inodes -d 1 ~/domains/example.com/public_html/wp-content | sort -n | tail -10
```

**Without `du --inodes`** (older systems), count with `find`:

```bash
find ~ -xdev -type f 2>/dev/null | cut -d/ -f1-5 | sort | uniq -c | sort -n | tail -15
```

Adjust `-f1-5` to group by a deeper or shallower path. `-xdev` keeps `find` on one filesystem.

**Find folders with a huge number of files directly inside them**, which is the typical sign of a session or cache folder:

```bash
find ~ -xdev -type d -exec sh -c 'n=$(ls -A "$1" | wc -l); [ "$n" -gt 10000 ] && echo "$n $1"' _ {} \; 2>/dev/null | sort -n
```

**Check your quota** if the server uses quotas:

```bash
quota -s          # your own usage and limits, including files
sudo repquota -as # every user on the filesystem (root only)
```

In the `quota` output, the `files` columns are inodes, next to the block (space) columns.

## The usual culprits and how to clean them

| Culprit | Typical location | Safe fix |
| --- | --- | --- |
| Page or object cache files | `wp-content/cache/`, plugin cache folders | Clear the cache from the plugin, or move to a server-side page cache or Redis |
| PHP sessions | A `sessions` or `tmp` folder in the account | Delete files older than the session lifetime; make sure session garbage collection runs |
| `node_modules`, `vendor` | App folders, old builds | Remove unused builds; install dependencies once per release, not per copy |
| Old backups unpacked on the server | `backup-*/`, `old/`, `public_html_old/` | Keep compressed archives off the server instead |
| Mail in Maildir | Mailbox folders, especially Trash and Junk | Empty Trash and Junk, archive old mail |
| Thumbnails and image variants | `wp-content/uploads/` | Remove unused image sizes, then regenerate only what you need |
| Logs and error dumps | `logs/`, `error_log` files in every folder | Rotate and delete old logs; fix the error that fills them |

To delete old session files, for example older than two days:

```bash
find ~/tmp/sessions -type f -mtime +2 -delete
```

Check the path twice before you run any `-delete` command, and take a backup first if you are unsure what a folder contains. Our [website backup strategy](/blog/website-backup-strategy) guide covers keeping backups off the server.

## How hosts enforce disk and inode limits

On Linux, per-account limits on space and file count are **filesystem quotas**. The filesystem that holds the accounts is mounted with quota support (`usrquota` on ext4, `uquota` on XFS), and each Linux user gets two limits for blocks and two for inodes:

| Limit | Meaning |
| --- | --- |
| Soft limit | Can be exceeded for a grace period, with a warning |
| Hard limit | Can never be exceeded; writes fail at this point |
| Grace period | How long the soft limit may be exceeded before it acts like the hard limit |

Quotas only work when each hosting account is its own Linux user, because the kernel counts files by owner. If all sites run as one shared user, such as `www-data`, a per-site file limit is impossible. Containers are another trap: on some container-based VPS products, quotas are not available inside the VPS at all, which is why panels usually prefer a full KVM virtual machine.

Without quotas, a panel can only measure usage after the fact, and one account with a runaway cache can fill the filesystem and stop every database and mailbox on the server.

### How many inodes should a plan allow?

There is no standard number, and it varies a lot between sites: a small brochure site and a store with thousands of product images and their thumbnails differ by an order of magnitude or more. Start from what your real sites use. Measure existing accounts with `repquota -as`, then set the limit comfortably above normal use and well below what the filesystem can hold, so that the whole server never runs out before one account does. Our guide to [hosting plan pricing](/blog/hosting-plan-pricing) covers how limits fit into plans.

## Disk and inode limits in ZoPanel

In ZoPanel, every hosting account is its own Linux user, so limits are kernel quotas, not estimates. Each package in **Packages** has **Disk (MB)** and **Files (inodes)**: disk is a filesystem quota the account cannot write past, and the inode limit is a quota on files and folders. Both need disk quotas to be enforced, which you can check in **Settings → System → Disk quotas**; without them, usage is only measured ([packages and limits](/docs/packages-limits)). When an account is full, writes fail for that account only.

Customers see **Disk space** and **Files (inodes)** next to their limits on the **Resources** page, where bars turn orange at 75% and red at 90%, and **Disk usage** helps find the folders that take space. They can also get a disk quota alert by e-mail or Telegram. To count files per folder, the commands above work in ZoPanel's sandboxed terminal when the package allows terminal access.

What ZoPanel does not do: clean caches for you, or raise an ext4 filesystem's total inode count, which no panel can change after the filesystem is made. More on the hosting toolset is on the [hosting features](/features/hosting) page.

## Conclusion

An inode limit is a limit on the number of files, not their size. When a site cannot write files but the disk looks half empty, run `df -i`, then `du --inodes` to find the folder responsible, and clean the cache, sessions or leftovers you find there. If you run a hosting server, enforce both disk and inode limits with quotas, so one account's runaway cache stays that account's problem.

To try per-account disk and inode quotas on your own VPS, [ZoPanel's Free plan](/pricing) covers 3 hosting accounts, 10 websites and 10 databases with no time limit.

## Frequently asked questions

### What is an inode in web hosting?

An inode is the filesystem record for one file or folder. Every file, folder, email message stored as a file, and cache file uses one. A hosting inode limit is therefore a limit on how many files and folders your account can have.

### Do emails count toward the inode limit?

It depends on how the host stores mail. With Maildir, each message is a separate file and uses an inode, so a mailbox with 100,000 messages uses 100,000 inodes. Some hosts count mail inside the account quota, others store it elsewhere; check your host's documentation.

### How do I reduce inode usage in WordPress?

Clear and limit file-based caches, delete old backups stored inside the site, remove unused plugins and themes, and empty session or temp folders. A server-side page cache or Redis object cache creates far fewer files than many file-based caching plugins.

### Can I increase the number of inodes on my server?

Not on an existing ext4 filesystem: the inode count is set when it is created. You can add a new filesystem with a lower bytes-per-inode ratio, or use XFS, which allocates inodes as needed. On shared hosting, ask for a plan with a higher inode limit.

### What happens when I reach my inode limit?

You cannot create new files or folders until you delete some. Uploads, cache writes, PHP sessions and backups fail, while existing files keep working. Delete unneeded files to get back under the limit; everything works again immediately.
