WHM shows all accounts as 0/unlimited quotas

There are many possible causes of this issue, however most relate to quotas being enabled on the filesystem itself.
Some ways to check the most common errors are:

Quotas enabled in the filesysem

By default, quoatas are enabled in the kernel on all SoftLayer Linux and FreeBSD kernels. If you’ve compiled/installed your own kernel, you’ll need to verify that quotas are enabled.

— FreeBSD systems will need to add “options QUOTA” to their kernel configuration and recompile. They will then need to add “enable_quotas=”YES”” to their /etc/rc.conf file.

— To enable quotas on a certain partition, one will need to modify the /etc/fstab file by adding usrquota (or grpquota if one desires the quota to pertain to an entire group rather than an individual user) to the options column (e.g. “LABEL=/home /home ext3 defaults,usrquota 0 0”).

[root@linux-test-server ~]# cat /etc/fstab
# This file is edited by fstab-sync – see ‘man fstab-sync’ for details
LABEL=/                 /                       ext3    defaults,usrquota        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-sda2         swap                    swap    pri=0,defaults        0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
/tmp             /var/tmp                    ext3    defaults,bind,noauto        0 0
[root@linux-test-server ~]#

— Once those entries are added, a reboot of the server should resolve the issue.

Run /scripts/fixquotas

Cpanel has it’s own tools to repair the quotas for it’s accounts. the command
#/scripts/fixquotas
run through ssh may resolve the issue.

Repquota

The command
#repquota -ua
will tell you if quotas are being reported for OS users at all.

Quotacheck

The command
#quotacheck -fv /home
will display the quotas for that filesystem, however the partition has to be unmounted first. It’s best to do this from Single User mode.

Formatting and Mounting a new drive in Linux

I have installed a new slave hard drive. How do I format it and mount it?

Solution:

1. Login as root: and type the following command:

[root@34 root]# fdisk /dev/hdc

2. This screen will appear:

The number of cylinders for this disk is set to 10011.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

3. Press p for print, this will show you the current partitons on the drive:

Command (m for help): p

Disk /dev/hdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

4. There are no current partitions, if there were, press d to delete them. Then press n to create a new partition and follow the rest of the commands:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-10011, default 1): Enter
Using default value 1: Enter
Last cylinder or +size or +sizeM or +sizeK (1-10011, default 10011): Enter
Using default value 10011

5: Write your new partiton to the drive:

Command (m for help): w
The partition table has been altered!

—————————————

6. Now to make the file system.

[root@34 root]# mkfs.ext3 /dev/hdc1
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
10059776 inodes, 20103331 blocks
1005166 blocks (5.00%) reserved for the super user
First data block=0
614 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

—————————————–

7. Now to make a directory to mount the new drive to.

[root@34 root]# mkdir /backups
[root@34 root]# mount /dev/hdc1 /backups
[root@34 root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 75G 1.3G 70G 2% /
/dev/hda1 99M 14M 81M 15% /boot
none 243M 0 243M 0% /dev/shm
/dev/hdc1 76G 33M 72G 1% /backups

You will see that the new drive is labled /dev/hdc1 and is mounted to /backups.
——————————————-

8. Now edit the /etc/fstab so that the mount is there after a reboot.

Current fstab is shown below:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda2 swap swap defaults 0 0

9. Now we are going to add one line at the end:

[root@34 root]# vi /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/hdc1 /backups ext3 defaults 0 0

Save and quit vi.