Skip to content

cPanel quota shows wrong usage — diagnosing the divergence

When cPanel reports an account using 6 GB but du shows 3 GB, where the divergence comes from and how to resolve it without rebooting anything.

A customer says they freed 2 GB of files and their cPanel usage didn’t drop. Or the opposite — they uploaded 500 MB and the quota didn’t go up. The divergence between actual disk usage and cPanel-reported usage has three common causes, each with a different fix.

What’s happening

cPanel has its own cached view of account usage, updated by Cpanel::Quota and the daily update_db_cache. The kernel quota system (quota -u) reads the on-disk quota database, which is also updated on a schedule. The actual disk reality (du -sh) is the ground truth. Divergence between any two of these three layers is a sign that the cache hasn’t refreshed yet, or that there’s a stale entry.

How to verify

Compare the three numbers:

du -sh /home/<user>
quota -u <user>
cat /var/cpanel/quota_cache/<user>

If du -sh and quota -u agree but cPanel UI doesn’t, the cPanel cache is stale. If du -sh differs from quota -u, the kernel quota database is stale.

The fix

  1. Stale cPanel cache: rebuild via /usr/local/cpanel/bin/quota_cache --user=<user> --rebuild. The customer-facing display updates within a few minutes.
  2. Stale kernel quota: run /scripts/fixquotas. This is the big-hammer fix — it recomputes from disk reality. See the dedicated KB on running fixquotas safely.
  3. Mismatched filesystem options: confirm /etc/fstab has usrquota,grpquota on the /home partition. If missing, mount options need adding and a remount.
  4. Open-but-unlinked files: lsof +L1 shows files held open after deletion. Until the daemon closes the handle, the bytes still count. Restart the daemon (Apache, PHP-FPM, MySQL — usually one of these).
  5. Document the divergence and the fix in the customer’s ticket. Recurring divergence on the same account points at an application that opens files and keeps them open across rotations.

Stack Harbor handles quota divergence diagnostics as routine work under cPanel/WHM management.