How to Fix WHM Disk Usage Incorrect

How to Fix WHM Disk Usage Incorrect

⚡ WHM Disk Usage Incorrect – How to Fix

This issue usually happens when the disk quota file is corrupted or WHM/cPanel shows incorrect usage for a specific cPanel user.


🔹 Step 1: Fix Quotas

Run the following command as root:

# /scripts/fixquotas --force 

This repairs the quota file and resets disk usage counts.


🔹 Step 2: If Quota Write Fails

If you see errors like this:

Resetting quota for AB to 500 M
edquota: Quota write failed (id 32230): Invalid argument
Resetting quota for XY to 500 M
edquota: Quota write failed (id 32010): Invalid argument

Reboot the server to reload quota services:

# shutdown -r now 

🔹 Step 3: Manually Check User Disk Usage

If the problem is only for a specific cPanel account, calculate usage manually:

# du -shc /home/user/*

👉 Replace user with the actual system username.
This shows the real directory size inside the user’s /home/ folder.


🔹 Step 4: Check for Files Outside /home Directory

Sometimes users may have files outside their home directory. To locate them:

find / -mount -wholename /home -prune -o -wholename /usr/share/cagefs-skeleton -prune -o -user useraccount -exec stat -c '%s %n' {} \; >> ~/user-files.out

👉 Replace useraccount with the actual username.

The results will be saved here:

# /root/user-files.out

This lets you see if the account owns files outside the normal /home directory, which may explain incorrect usage.


✅ After these steps, WHM should display correct disk usage values.

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0