Page 1 of 1

space on /var going down (11.74GB [14%])

Posted: 16 Feb 2017 19:26
by mayrmart
Hi,

My free space on /var was dropping a few days ago from 80% to 14%
I changed the Quarantine Retention to 1 day but the space is still allocated.
Any ideas how to get back to 80% and how to find the used space ?

Thanks

Martin

Re: space on /var going down (11.74GB [14%])

Posted: 17 Feb 2017 23:24
by shawniverson
Where did you change the quarantine retention setting?

Re: space on /var going down (11.74GB [14%])

Posted: 18 Feb 2017 13:06
by mayrmart
In the efa config menu
mailwatch settings
Quarantine Retention

is that the wrong way ?

Re: space on /var going down (11.74GB [14%])

Posted: 18 Feb 2017 23:03
by shawniverson
That should be fine.

If you execute the following, do you see anything?

Code: Select all

sudo /usr/local/bin/mailwatch/tools/Cron_jobs/db_clean.php
sudo /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_maint.php --clean 

Re: space on /var going down (11.74GB [14%])

Posted: 19 Feb 2017 19:04
by mayrmart
No, dont work
still just 13 % free

Re: space on /var going down (11.74GB [14%])

Posted: 19 Feb 2017 19:06
by shawniverson
What does the retention actually say in /var/www/html/mailscanner/conf.php ?

Re: space on /var going down (11.74GB [14%])

Posted: 19 Feb 2017 19:24
by mayrmart
do you mean this parameter ?

// Define how many days of emails to keep
define('RECORD_DAYS_TO_KEEP', 2);

// Define how many days to audit logs to keep
define('AUDIT_DAYS_TO_KEEP', 60);

Re: space on /var going down (11.74GB [14%])

Posted: 19 Feb 2017 19:29
by mayrmart
This is also set to 2 days

define('QUARANTINE_DAYS_TO_KEEP', 2);

Re: space on /var going down (11.74GB [14%])

Posted: 20 Feb 2017 10:54
by shawniverson
Okay, that looks good.

Was the time ever wrong on your system, i.e. in the future? In rare cases I have seen this.

Re: space on /var going down (11.74GB [14%])

Posted: 20 Feb 2017 19:54
by mayrmart
dont know - but dont think so, but is there a way to manual delete the complete used space ?
thanks for your support !

Re: space on /var going down (11.74GB [14%])

Posted: 20 Feb 2017 21:02
by shawniverson
Yeah, anything in /var/spool/MailScanner/quarantine/<date> is fair game. You can go through and remove things, just know anything still in the database that links to these files won't open anymore, of course :P

Re: space on /var going down (11.74GB [14%])

Posted: 21 Feb 2017 12:27
by mayrmart
Strange thing - just 2 days in /var/spool/MailScanner/quarantine/

20170220 20170221

Any other ideas where my lost 60 GB could be ?

[efa@efa /]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_00-lv_root
8125880 1707736 5998716 23% /
tmpfs 4025800 0 4025800 0% /dev/shm
/dev/sda1 495844 106761 363483 23% /boot
/dev/mapper/vg_00-lv_tmp
999320 2332 944560 1% /tmp
/dev/mapper/vg_00-lv_var
89147608 73017028 11595492 87% /var
none 4025800 2920 4022880 1% /var/spool/MailScanner/in

Re: space on /var going down (11.74GB [14%])

Posted: 21 Feb 2017 12:34
by mayrmart
Found it in SpamAssassin-Temp !

Can i delete this files ?

[root@efa SpamAssassin-Temp]# ls -al
total 69665268
drwxr-xr-x 2 postfix root 4096 Feb 11 12:03 .
drwxrwx--- 5 root mtagroup 4096 Feb 11 12:03 ..
-rw------- 1 postfix postfix 0 Feb 10 22:34 magick-102IlUH4
-rw------- 1 postfix postfix 0 Feb 10 22:34 magick-4E1P81el
-rw------- 1 root root 71335612416 Feb 11 12:16 .magick-bRUUKlMB.4m1b6m
-rw------- 1 postfix postfix 151552 Feb 11 03:51 .spamassassin10368uAjDzmtmp
-rw------- 1 postfix postfix 0 Feb 11 04:08 .spamassassin13820ewct6qtmp
-rw------- 1 postfix postfix 0 Feb 11 04:08 .spamassassin13826qGsOCqtmp
-rw------- 1 postfix postfix 256594 Feb 10 22:33 .spamassassin2620cGg0Ritmp
-rw------- 1 postfix postfix 196581 Feb 10 22:33 .spamassassin2620k45tHXtmp
-rw------- 1 postfix postfix 52834 Feb 10 22:33 .spamassassin2620mxoCgitmp
-rw------- 1 postfix postfix 1443 Feb 9 19:08 .spamassassin29102lH2P3otmp
-rw------- 1 postfix postfix 0 Feb 11 06:22 .spamassassin46340dyyKzdtmp
-rw------- 1 postfix postfix 53248 Feb 11 06:25 .spamassassin47150X1S8o2tmp
-rw------- 1 postfix postfix 163840 Feb 11 06:28 .spamassassin475412uKoYjtmp
-rw------- 1 postfix postfix 208896 Feb 11 06:36 .spamassassin49431Sgvfwgtmp
-rw------- 1 postfix postfix 225280 Feb 11 06:36 .spamassassin49437jFDJYjtmp
-rw------- 1 postfix postfix 0 Feb 11 11:51 .spamassassin50379zpm9Kftmp
-rw------- 1 postfix postfix 135168 Feb 11 02:32 .spamassassin57002W8hi8Jtmp
-rw------- 1 postfix postfix 0 Feb 11 02:32 .spamassassin57005QCPsqLtmp
-rw------- 1 postfix postfix 69632 Feb 11 02:32 .spamassassin57019pC7oODtmp
-rw------- 1 postfix postfix 57344 Feb 11 02:32 .spamassassin57023cqJ0bbtmp
-rw------- 1 postfix postfix 0 Feb 11 02:32 .spamassassin570268gbYU8tmp
-rw------- 1 postfix postfix 28672 Feb 11 02:32 .spamassassin57042P69lpRtmp

Re: space on /var going down (11.74GB [14%])

Posted: 21 Feb 2017 22:08
by shawniverson
Yes, you should be able to clear those out.

Re: space on /var going down (11.74GB [14%])

Posted: 22 Feb 2017 08:56
by mayrmart
Deleted the SpamAssassin-Temp file
Now 70 GB more space !
Thanks Martin

Re: space on /var going down (11.74GB [14%])

Posted: 23 Feb 2017 15:30
by Justin
mayrmart wrote: 21 Feb 2017 12:34
-rw------- 1 root root 71335612416 Feb 11 12:16 .magick-bRUUKlMB.4m1b6m
This file is 71GB, so this can be the issue

EDIT: I see you've already solved the issue! :D

Re: space on /var going down (11.74GB [14%])

Posted: 26 Apr 2017 11:18
by pdwalker
I think this needs to be added to the regular maintenance to clear these useless files out.

Code: Select all

find /var/spool/MailScanner/incoming/SpamAssassin-Temp -mtime +1 -print | xargs rm -f

Re: space on /var going down (11.74GB [14%])

Posted: 27 Apr 2017 01:05
by shawniverson

Re: space on /var going down (11.74GB [14%])

Posted: 28 Apr 2017 22:44
by henk
Since EFA is still on Centos6, You can use package tmpwatch also to do some housekeeping on useless files.
By default, tmpwatch dates files by their atime (access time)

the /var/spool/MailScanner/incoming/SpamAssassin-Temp is perfect candidate for tmpwatch

just add in /etc/cron.daily/tmpwatch at the end:

Code: Select all

#! /bin/sh
flags=-umc
/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
        -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
        -X '/tmp/hsperfdata_*' -X '/tmp/.hdb*lock' -X '/tmp/.sapstartsrv*.log' \
        -X '/tmp/pymp-*' 10d /tmp
/usr/sbin/tmpwatch "$flags" 30d /var/tmp
for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
    if [ -d "$d" ]; then
        /usr/sbin/tmpwatch "$flags" -f 30d "$d"
    fi
done

# ----- User defined cleanup-jobs -----
# MailScanner_incoming
/usr/sbin/tmpwatch -u  48 /var/spool/MailScanner/incoming/SpamAssassin-Temp