DirectAdmin displays used diskspace incorrectly

vaidas

Verified User
Joined
Jul 21, 2011
Messages
8
I have this weirdness with the reported disk usage:

Total Disk Usage (MB) 5999.6 7000
Email Disk Usage 3.09 GB
Database Disk Usage 174.1 MB

Quota reports:
myserver ~ # quota -s problematic_user1
Disk quotas for user problematic_user` (uid 1267):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/vps-root
3065M 7000M 7700M 32406 0 0

Where do the other almost 3GB come from?

I've googled a way to get more detail:

myserver ~ # echo 'action=tally&value=problematic_user1&type=user' >> /usr/local/directadmin/data/task.queue
myserver ~ # cd /usr/local/directadmin/
myserver /usr/local/directadmin # ./dataskq d800
Debug mode. Level 800

root priv set: uid:0 gid:0 euid:0 egid:0
pidfile written
staring queue
Tally User problematic_user1 Begin
/home/problematic_user1/Maildir is 389120 : realtotal: 389120
/home/problematic_user1/imap is 427143168 : realtotal: 427532288
/home/problematic_user1/.spamassassin/spam is 0 : total: 0 realtotal: 427532288
/home/problematic_user1/.spamassassin/user_spam is 0 : total: 0 realtotal: 427532288
/var/spool/virtual/domain1.com is 0 : total: 0 realtotal: 427532288
Majordomo usage for /etc/virtual/domain1.com/majordomo : 2881523712
/var/spool/virtual/domains2.com is 0 : total: 2881523712 realtotal: 3309056000
Majordomo usage for /etc/virtual/domain2.com/majordomo : 4096
databases for problematic_user1
DAdminUsage.bytes for problematic_user1
Counting found totals for problematic_user1
total bw is 357497086.000000 from 357497086 (long long: 357497086)
bw in meg: 340.935789
meg converted to a string: 340.9
spaceused: 3229999104.000000 (just quota)
spaceused: 3412595160.000000 (add dbtotal 182596056)
spaceused: 6294122968.000000 (add emltotal 2881527808) (fyi: realemltotal: 3309060096)
spaceused: 6294122968.000000 (add apachetotal 0)
spaceused: 6294122968.000000 (add anonftptotal 0)
spaceused, in meg: 6002.543419
meg to temp: 6002.5
user.usage quota: 6002.5 actual: 6002.543419 (should match)
user.uagae email_quota: 3309060096 actual: 3309060096 (should match)
Tally User problematic_user1 Complete
done queue

But I don't really understand its output. Can anyone help me with this? This problem exists for a couple of users, not just a single one.
 
Majordomo Digests? Is user using mailing lists? Look manually in /etc/virtual

Code:
# du -h --max-depth=1 /etc/virtual/domain1.com/majordomo/

for each domain of the user.

Webmail? Did you check /var/www/html/?

Did you try to search all files owned by the user?

Code:
find / -user problematic_user1
 
Majordomo Digests? Is user using mailing lists? Look manually in /etc/virtual

Code:
# du -h --max-depth=1 /etc/virtual/domain1.com/majordomo/

for each domain of the user.

Yes, the digests directory takes up 2.7GB. Why is that and how can I change it?

Webmail? Did you check /var/www/html/?

Did you try to search all files owned by the user?

Code:
find / -user problematic_user1

I did that but pretty much all of the user-owned files were in his home directory.
 
Remove digests, or leave it as it is, you should decide with or without your customer.

Yes, the digests directory takes up 2.7GB. Why is that and how can I change it?

Read docs about configuring digests in Majordomo. I personally use this script:

Code:
#!/bin/sh
#----------------------------------------------------------------------
# Description: Majordomo Mailings Lists Digest and Archives clearing
# Created at: Wed Oct 22 15:40:22 NOVST 2008
#----------------------------------------------------------------------

VIRTUAL_DIR="/etc/virtual";

{
for i in `ls ${VIRTUAL_DIR}`
do
    if test -d "${VIRTUAL_DIR}/$i"
    then

        # STEP 1
        DIGESTS_DIR="${VIRTUAL_DIR}/$i/majordomo/digests";
        if test -d ${DIGESTS_DIR}
        then
            for j in `ls ${DIGESTS_DIR}`
            do
                echo "`date` Clearing ${DIGESTS_DIR}/$j/";
                ##-- rm ${DIGESTS_DIR}/$j/*;
                find ${DIGESTS_DIR}/$j -mtime +2 -type f -exec rm \{\} \;
            done;
        fi;

        # STEP 2
        ARCHIVES_DIR="${VIRTUAL_DIR}/$i/majordomo/lists";
        if test -d  ${ARCHIVES_DIR}
        then
            for j in `ls ${ARCHIVES_DIR} | grep "\-digest.archive"`
            do
                echo "`date` Clearing ${ARCHIVES_DIR}/$j/";
                # if test -d  ${ARCHIVES_DIR}/$j/*
                # then
                ##--    rm ${ARCHIVES_DIR}/$j/*;
                # fi;
                find ${ARCHIVES_DIR}/$j -mtime +2 -type f -exec rm \{\} \;
            done;
        fi;
    fi;
done;
} > /var/log/majordomo_clear_digest.log

exit 0;

to clear digests.
 
As I see, this directory contains all email ever sent to the mailing list. I don't really see a point in keeping these emails after the digest has been generated and sent to the subscribers. I've looked into the mailing list settings documentation of DirectAdmin but I couldn't find the descriptions of those settings... I also read the majordomo config files and documentation of settings in those files but couldn't find anything related to managing digest files/archive.

I'm now thinking about deleting all but last several days of files from this directory...

Any suggestions how else I could solve this problem? I guess this is a problem waiting to happen for all mailing lists.
 
For now I have nothing more to add, I've posted a script which I've been using since Wed Oct 22 15:40:22 NOVST 2008, and I've never had a need to find any other solution.

If you find anything else, please update us with your findings.
 
I'll use that for now, but I guess the DirectAdmin defaults could be changed if that's possible.

Thanks for your help!
 
Back
Top