Sites going over allocated disk space

bonnmac

Well-Known Member
Apr 26, 2003
101
0
166
cPanel/WHM doesn't stop people from going over the amount of HD space you assign them?

I have a client I have given 250MB to. He's using 265MB. How is this possible?

cpanel doesn't restrict accounts when their quotas have been reached? Meaning they can just keep uploading?

This is very strange to me. What's the point in the quotas then?

Sorry I'm just frustrated. My other servers are ensim and this doesn't occur.

Is there a fix to this somewhere?

Thanks
 

CodyFrisch

Active Member
Apr 3, 2003
28
0
151
Helena, MT
Are you looking at disk usage with 'du' in a shell, and then comparing it to the quota you have set?

If so, yes there will always be more used that one what quota system thinks unless you use the XFS file system. The quota system for non-XFS file systems measures the actual data in each file and calculates that.

XFS uses the filesystem itself to manage quotas, and has native quota support in the file system that is always up to date in real time.

If you aren't using XFS, things like directories (4KB each) and slack space in units (4KB-1byte per file maximum) don't get counted in the quota system. The file system allocates 4KB at a time, so every directory or file uses AT LEAST 4KB. If a file uses 4KB+1Byte it uses 8KB on the disk, because that 1byte requires the file system allocate another 4KB unit to the file.

So, what can you do about this? Nothing unless you want to try to switch to XFS. Of course XFS has many other benefits, but its also not natively supported by RedHat, so you need to compile a custom kernel as well as install the XFS file system tools.

But this is the best reason I can give for what you're seeing.
 

CodyFrisch

Active Member
Apr 3, 2003
28
0
151
Helena, MT
Hmm. In a shell do: "repquota -v /home | grep username" and see what its saying. If this isn't showing them overquota, it may be that quotacheck hasn't been running properly.

But in my expirience WHM and cpanel use the accounting functions of the quota system when calculating disk usage.

Also, in that repquota line above, you can see the hard and soft limits. It may be possible the two aren't the same (which isn't typical with cpanel setups though). A soft limit lets them go over for a certain amount of time before it locks them down. This is always lower than the hard limit, which as soon as they reach that they get stopped from adding more.

If it appears requota is reporting something different than what you see in cpanel/whm, try running a quotacheck (I'm a bit rusty on this since its unnecessary with the XFS file system...)