Too Low or 0.00 Disk Usage in DirectAdmin

To check the partition on our server, need to run the following commands.

df -h

The result would depend on what kind of partition we used on the server. If the server having an /home partition, then your quota_partition value will be /home.

If it was not, then it will be /, so your quota partition will likely be /.

In some cases, you might have a symbolic link like: /home –> /usr/home. In such cases, your quota will be same as above /usr.

Set the partition value here, as needed: /home

To check how much space is consumed by the system, DirectAdmin will run the following:

/usr/sbin/repquota /home

NOTE: repquota is a command used to print the overall summary of the server disk usage and quotas for the specified file system.

Where /home is the quota_partition value being set in the /usr/local/directadmin/conf/directadmin.conf file. (Just like above examples: /home, / or /usr ). Then it will return the result with a list of numbers, example:

/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

 

If the second column ” used ” is not showing anything or users are not in the list. Then we can run the following quotacheck command.

On Redhat:

 /sbin/quotaoff -a; /sbin/quotacheck -avugm; /sbin/quotaon -a;

FreeBSD:

/usr/sbin/quotaoff -a; /sbin/quotacheck -avug; /usr/sbin/quotaon -a;

 

If the repquota throwing errors then we need to check in deeply this with the filesystem /etc/fstab file, it will be created automatically once the OS is installed. Whenever changes happen on the filesystem it will be modified automatically. To check with this, need to ensure that it contains rw, userquota, groupquota line beside the partition that is using the quotas.

For an example:

# Device                Mountpoint      FStype  Options            Dump    Pass#

/dev/ad0s1a             /home           ext3     rw,usrquota,grpquota 1       1

/dev/ad0s1e             /tmp            ext3     rw                 2       2

proc                    /proc           procfs   rw                 0       0

 

In this case, the quota_partition is /home based on server configuration. Maybe it will / or /usr in your system.

Or if it was shows, you may consider switching to journaled quota to avoid running quotacheck after an unclean shutdown:

In that case, instead of “,usrquota,rpquota”, add “,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0” to your fstab file.

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.

If you need any further help, please do reach our support department.

Was this answer helpful? 0 Users Found This Useful (0 Votes)