William's advice is solid. A full HDD/SSD will cause this kind of behavior. When I get a call from someone needing help with this issue, this is what I do:
First I check the space available on the drive:
- Code: Select all
df -h
If the drive is anywhere near or over 90% full, I begin looking for files to delete. Using this command, I get a list of the 10 largest directories on the system in /var, where most of the disposable files reside:
- Code: Select all
du -a /var | sort -n -r | head -n 10
Quite frequently, I'll see that among the largest directories is /var/spool/asterisk/monitorDONE. This is where your call recordings live. At that point, I get the owner back on the phone and tell them that either we need to delete, or better yet, move their call recordings off the server and onto another server via FTP. After figuring out what they want to do, I usually end up removing call recordings that are older than X number of days (in this example, a day):
- Code: Select all
find /var/spool/asterisk/monitorDONE/ORIG -maxdepth 2 -type f -mtime +1 -print | xargs rm -f
Depending upon the number of recordings needed to be deleted, this operation could take some time. After it completes, I check the drives available space, and if there's (much) more room, I reboot the server and ensure that everything comes back okay.
This, of course, is just one example. There are many ways of going about freeing up space on a drive that's filled to capacity.