Disk usage is incorrect in both WHM and cPanel

DBJoshua

Active Member
Jun 7, 2007
44
0
156
I've tried running both quota related fixes :

- fixquotas
- updatequota

I've tried forcing a cPanel update.

I'm out of ideas. It's a brand new account, using literally 0 resources (no emails, no files), it's showing up as 1gb used.

Any suggestions?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
What is your OS and cPanel version?

Do both WHM and cPanel show 1 GB used, or do they both show different values? What are those values?

What does:
Code:
du -h /home/user
show?
 

bmcpanel

Well-Known Member
Jun 1, 2002
546
0
316
I've tried running both quota related fixes :

- fixquotas
- updatequota

I've tried forcing a cPanel update.

I'm out of ideas. It's a brand new account, using literally 0 resources (no emails, no files), it's showing up as 1gb used.

Any suggestions?
There is probably another file somewhere that has the same UID. Following are the instructions I use to find and fix this problem.

---------------------------
### First, you need to locate the uid of the customer. You will need to know their username. At shell, run the following command...

vi /etc/passwd

#### With that file open, run a search on their username

/someuser

### If the user is found, you will see a 5 digit number and a smaller number. The larger number is the UID.

### Now, go to shell and run the following command (Replace "33025" with the UID of the user in question)

find / -uid 32025

A listing will be displayed of all of the files that have that UID. My guess is there is a file or files somewhere on the server that have the same UID of the user you have just added.
 

DBJoshua

Active Member
Jun 7, 2007
44
0
156
What is your OS and cPanel version?

Do both WHM and cPanel show 1 GB used, or do they both show different values? What are those values?

What does:
Code:
du -h /home/user
show?

They both show the same value.. 1.9GB now.

du -h /home/user shows about 2MB used total, with 640k being in /public_html and 20kb being used in /mail (and so on..)
 

DBJoshua

Active Member
Jun 7, 2007
44
0
156
Nothing showing up under the uid :(

There is probably another file somewhere that has the same UID. Following are the instructions I use to find and fix this problem.

---------------------------
### First, you need to locate the uid of the customer. You will need to know their username. At shell, run the following command...

vi /etc/passwd

#### With that file open, run a search on their username

/someuser

### If the user is found, you will see a 5 digit number and a smaller number. The larger number is the UID.

### Now, go to shell and run the following command (Replace "33025" with the UID of the user in question)

find / -uid 32025

A listing will be displayed of all of the files that have that UID. My guess is there is a file or files somewhere on the server that have the same UID of the user you have just added.
 

Immortal

Member
Oct 14, 2004
11
0
151
Can you please let us know whether the issue was fixed or not? We're facing a similar behaviour on 11.6.0 (R15076) and I'd like to know if this matter got solved before submitting a ticket to CPanel.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
To my knowledge, the tech support ticket was never opened. Thus we could not determine the cause for this issue. We are unable to reproduce this in our testing environment, which is the reason a tech support ticket is needed, in order to determine the variances between our test environment and what some people are doing.

To reiterate: please open a tech support ticket at http://cpanel.net/support/
 

HH-Steven

Well-Known Member
Aug 29, 2004
282
0
166
cPanel Access Level
Root Administrator
There is probably another file somewhere that has the same UID. Following are the instructions I use to find and fix this problem.

---------------------------
### First, you need to locate the uid of the customer. You will need to know their username. At shell, run the following command...

vi /etc/passwd

#### With that file open, run a search on their username

/someuser

### If the user is found, you will see a 5 digit number and a smaller number. The larger number is the UID.

### Now, go to shell and run the following command (Replace "33025" with the UID of the user in question)

find / -uid 32025

A listing will be displayed of all of the files that have that UID. My guess is there is a file or files somewhere on the server that have the same UID of the user you have just added.
We're having the exact same issue and running the above shows 100's of files on different users having the same UID.

Is there any update on this?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
We're having the exact same issue and running the above shows 100's of files on different users having the same UID.

Is there any update on this?
If the UID is for the user 'nobody' then that is normal for servers that use mod_php.
 

carock

Well-Known Member
Sep 25, 2002
266
9
168
St. Charles, MO
The DU on command line will not show you the directories that begin with .

[email protected] [/home/meangert]# du -sh */
3.4M access-logs
92K etc
12M mail
8.0K public_ftp
66M public_html
16M tmp
66M www

[email protected] [/home/meangert]# du -sh
174M .

Both cPanel and WHM say this account is using 174 meg.

These are missing from the above output.

8.0K ./.sqmaildata
20K ./.neomail-scflesch/meangert
24K ./.neomail-scflesch
82M ./.spamassassin
40K ./.cpanel-datastore
96K ./.neomail/meangert
100K ./.neomail
52K ./.cpanel/datastore
64K ./.cpanel

Which added to the total will be 174 Meg. Notice the .spamassassin is using a lot of space. After I made the Default Address :fail: this directory doesn't grow like that anymore.

Chuck
 
Last edited:

AlexV.

Well-Known Member
Jun 15, 2006
212
1
168
carock:

Could you please advise what OS and cPanel Build and Version are you running.

I wasn't able to replicate the issue on the latest version of CURRENT.

Thank you in advance.
 

carock

Well-Known Member
Sep 25, 2002
266
9
168
St. Charles, MO
What I'm saying is the cPanel/WHM and DU shell command work correctly no actual problem.

The guy in the first post couldn't find where all the disk space was going and the next response was to use the DU command.

The reason the DU command doesn't match cPanel and WHM disk usage is the DU command does not include the . directories such as .spamassassin .cpanel and so on...

I found on my server example that the .spamassassin directory was using 80+ Meg of disk space and that made my comparison between the DU command and WHM/cPanel way off.

Chuck
 
Dec 17, 2006
8
0
151
Invalid quotas

Hi there,

I could not find any files using the DU command. I did some research and if you run the following command you will find the files and thier locations:

FIND -user USERNAME

My problem is I have an old drive hooked up that never got pulled and it was adding the file sizes owned by the users from the new drive and from the old mounted drive as well. I hope that the find will help you out. Granite if you have alot of users that you need to find files for this can be a tedious process.

Shawn
 
Last edited: