*** Note: If you're running a VPS with a "simfs" file system, quotas usually cannot be enabled with normal means. Â Contact yoru VPS provider to enable quotas for you.
DirectAdmin relies on the system quotas to return a value for how much space is being used. Â DirectAdmin will run
/usr/sbin/repquota /home
Where /home is the quota_partition value set in the /usr/local/directadmin/conf/directadmin.conf file (eg, /home, / or /usr). Â The command should output a large list of numbers, eg[root@server]#Â /usr/sbin/repquota /home
*** Report for user quotas on device /dev/hda3
Block grace time: 7days; Inode grace time: 7days
Block limits         File limits
User       used   soft   hard  grace   used  soft  hard  grace
----------------------------------------------------------------------
root    --  417796    0    0      7446   0   0
nobody   --    4    0    0        1   0   0
bin    --  56880    0    0       510   0   0
majordomo -- Â Â Â 8 Â Â Â 0 Â Â Â 0 Â Â Â Â Â Â Â 2 Â Â 0 Â Â 0
diradmin  --    8    0    0        2   0   0
admin   --   200    0    0       44   0   0
user123 Â -- Â Â 100 Â Â Â 0 Â Â Â 0 Â Â Â Â Â Â 22 Â Â 0 Â Â 0
user456 Â -- Â Â 100 Â Â Â 0 Â Â Â 0 Â Â Â Â Â Â 22 Â Â 0 Â Â 0
Redhat:
/sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;
FreeBSD:
/usr/sbin/quotaoff -a; /sbin/quotacheck -avug; /usr/sbin/quotaon -a;
If are getting errors and no output is displayed for the repquota command, you'll need to check your /etc/fstab file to make sure that it contains the rw,userquota,groupquota line beside the partition that is using the quotas.
*Important: Â On Linux (Redhat/Debian), it's usrquota,grpquota, and on FreeBSD it's userquota,groupquota.
Sample /etc/fstab (do not make your's look identical if it's different, this is one example from a specific OS):
# Device         Mountpoint    FStype  Options     Dump   Pass#
/dev/ad0s1a            / ufs   rw,userquota,groupquota 1    1
/dev/ad0s1e       /tmp       ufs   rw        2    2
proc           /proc      procfs  rw        0    0
Once the repquota program is returning a normal value, then you can run the tally to get the correct usage to show up in DirectAdmin:
echo "action=tally&value=all" >> /usr/local/directadmin/data/task.queue
This task.queue command will get picked up by the dataskq binary. Â Â It calls the repquota command and dumps it into /home/tmp/quota-dump.
Check /var/log/directadmin/errortaskq.log for any errors with this.
Running the tally manually for a User can also help with debugging these issues.