Disk Full / System Slow¶
Symptom: system feels sluggish; calls drop randomly; Apply Config hangs; logs say "no space left on device."
Most Likely Causes¶
- Voicemail messages accumulating — VM-to-email working but Delete Voicemail =
No, files pile up forever. - Call recordings not pruned —
/var/spool/asterisk/monitor/grows unbounded. - Asterisk full log not rotating —
/var/log/asterisk/fullreaches GBs. - MariaDB binlogs unrotated.
- System backups stored locally without rotation.
- Old Sangoma module cache.
Diagnose¶
# Where's the space gone?
df -h
du -sh /var/spool/asterisk/voicemail/ /var/spool/asterisk/monitor/ \
/var/log/asterisk/ /var/lib/mysql/ /var/spool/asterisk/backup/ 2>/dev/null
# Top 20 largest files:
find / -type f -size +100M 2>/dev/null | head -20
Fix¶
Match what's eating disk:
- Voicemail: for each extension, set Delete Voicemail =
Yes(assuming VM-to-email is on, the email is the persistent copy). Then prune existing:find /var/spool/asterisk/voicemail/ -name "msg*.wav" -mtime +90 -delete - Recordings: add a cron to retain 90 days:
echo '0 3 * * * find /var/spool/asterisk/monitor -type f -mtime +90 -delete' \ >> /etc/crontab - Asterisk log: verify logrotate config:
Truncate live:
cat /etc/logrotate.d/asterisk logrotate -f /etc/logrotate.d/asterisk> /var/log/asterisk/full. - MariaDB binlogs:
PURGE BINARY LOGS BEFORE NOW() - INTERVAL 7 DAY;in mysql. - Backups: System Admin → Backup & Restore → backup template → Maintenance → keep last 7.
- Module cache:
rm -rf /var/cache/php/*,fwconsole cache clean.
When to Escalate¶
Disk filling fast with no obvious culprit. Run iotop -o to see who's writing. May be a misbehaving module (look for repeating debug logs).