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

General eFa discussion
Post Reply
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post 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
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post by shawniverson »

Where did you change the quarantine retention setting?
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post by mayrmart »

In the efa config menu
mailwatch settings
Quarantine Retention

is that the wrong way ?
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post 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 
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post by mayrmart »

No, dont work
still just 13 % free
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post by shawniverson »

What does the retention actually say in /var/www/html/mailscanner/conf.php ?
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post 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);
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post by mayrmart »

This is also set to 2 days

define('QUARANTINE_DAYS_TO_KEEP', 2);
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post 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.
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post by mayrmart »

dont know - but dont think so, but is there a way to manual delete the complete used space ?
thanks for your support !
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post 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
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post 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
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post 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
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

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

Post by shawniverson »

Yes, you should be able to clear those out.
mayrmart
Posts: 15
Joined: 15 May 2016 15:50

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

Post by mayrmart »

Deleted the SpamAssassin-Temp file
Now 70 GB more space !
Thanks Martin
Justin
Posts: 111
Joined: 18 Sep 2014 13:00
Location: The Netherlands
Contact:

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

Post 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
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

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

Post 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
henk
Posts: 517
Joined: 14 Dec 2015 22:16
Location: Netherlands
Contact:

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

Post 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 
“We are stuck with technology when what we really want is just stuff that works.” -Douglas Adams
Post Reply