Hard drive Storage issues

Help with storage, something is using up my hard drive storage and I cannot figure out what it is. Every hour I get an email where the percentage is going up at least 1%.

run a df -h as the root user, in / what does that show you?

alternatively:
du / | sort -nr | more

[[email protected] ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 12K 3.9G 1% /dev/shm
tmpfs 3.9G 401M 3.5G 11% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/SangomaVG-root 433G 363G 71G 84% /
/dev/cciss/c0d0p1 1.9G 233M 1.6G 13% /boot
tmpfs 782M 0 782M 0% /run/user/0
tmpfs 782M 0 782M 0% /run/user/995
[[email protected] ~]#

jeeeesus, thats 300+ gigs of data on there.
the second command I shared might be able to help you find whats consuming.

Quite abnormal however i turned off the recording for internal extension calls and leave the Queue recordings intact which did not help. Monthly I download and delete the recordings leaving only about 6 months on the server but since this weekend i have noticed a spike in the storage. I will post the outcome of the other command.

WOW, this output from the command du / | sort -nr | more is huge, i don’t think i can post all those lines.

This is more readable

du -xh --max-depth=1 / |sort -h

The second from the bottom can then be queried du -xh --max-depth=1 /var |sort -h in an iterative fashion

What will happen when it reaches 99-100%?

[[email protected] ~]# du -xh --max-depth=1 / |sort -h
0 /media
0 /mnt
0 /opt
0 /srv
40K /tmp
220K /tftpboot
67M /root
71M /etc
314M /home
4.7G /usr
145G /var
150G /

[[email protected] ~]# du -xh --max-depth=1 /var |sort -h
0 /var/account
0 /var/adm
0 /var/crash
0 /var/empty
0 /var/ftp
0 /var/games
0 /var/gopher
0 /var/kerberos
0 /var/local
0 /var/nis
0 /var/opt
0 /var/preserve
0 /var/yp
4.0K /var/tmp
8.0K /var/db
292M /var/cache
404M /var/log
1.8G /var/www
5.3G /var/lib
137G /var/spool
145G /var

things stop working, and not gracefully.

137g /var/spool

What the hell do you have in spool that is taking over 100 gigs??
is it just your Monitor folder?

or, did you accidentally create a recursive backup (which contains the previous backup)?

try:
du -xh --max-depth=1 /var/spool |sort -h

du -xh --max-depth=1 /var/spool/asterisk |sort -h

du -xh --max-depth=1 /var/spool/monitor |sort -h

[[email protected] ~]# du -xh --max-depth=1 /var/spool |sort -h
0 /var/spool/at
0 /var/spool/lpd
0 /var/spool/plymouth
4.0K /var/spool/cron
4.0K /var/spool/incron
4.0K /var/spool/postfix
4.4M /var/spool/mail
137G /var/spool
137G /var/spool/asterisk
[[email protected] ~]# du -xh --max-depth=1 /var/spool/asterisk |sort -h
0 /var/spool/asterisk/backup
0 /var/spool/asterisk/confbridge
0 /var/spool/asterisk/fax
0 /var/spool/asterisk/incron
0 /var/spool/asterisk/meetme
0 /var/spool/asterisk/outgoing
0 /var/spool/asterisk/pms
0 /var/spool/asterisk/system
12K /var/spool/asterisk/sysadmin
364K /var/spool/asterisk/cache
57M /var/spool/asterisk/voicemail
1.1G /var/spool/asterisk/tmp
136G /var/spool/asterisk/monitor
137G /var/spool/asterisk
[[email protected] ~]# du -xh --max-depth=1 /var/spool/asterisk/monitor |sort -h
0 /var/spool/asterisk/monitor/2018
0 /var/spool/asterisk/monitor/2019
0 /var/spool/asterisk/monitor/2020
136G /var/spool/asterisk/monitor
136G /var/spool/asterisk/monitor/2021

keep going :slight_smile: , you have ‘months’ in 2021 and ‘days’ in each of those ‘months’ , I would suggest that

find /var/spool/asterisk/monitor/ -mtime +${XDAYS} --delete
find /var/spool/asterisk/monitor/ -empty -type d -delete

would be a good start where XDAYS is the age of recordings that are no longer relevant. ( the second line is just good housekeeping)

the short answer though is, its call recordiongs.
you have >130 gigs of call recordings

And the long answer is to husband those recordings, so to keep the useful ones yet purge the stale ones.

ok, thank you I will download and delete some of those recordings and see if it makes a difference in the storage. Thanks @ Dicko and @ Sholinaty.

2 Likes

Well of course it will :wink:

As a point of order, we are linux here, so our monikers are properly @sholinaty and @dicko (case sensitive )

2 Likes

duly noted Sir.

1 Like