Missing disk space, please help

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
glennj
Posts: 3
Joined: 2009/12/09 20:48:43

Missing disk space, please help

Post by glennj » 2009/12/09 21:00:43

I have CentOS 4.7 running as a web server and for some reason my /home partition is filling up.

The strange thing is, I can't find the files that are taking up the space!

df -h gives the following...

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.9G 1.1G 3.6G 24% /
none 501M 0 501M 0% /dev/shm
/dev/sda7 122G 110G 5.7G 96% /home
/dev/sda6 981M 18M 914M 2% /tmp
/dev/sda3 7.7G 5.1G 2.3G 70% /usr
/dev/sda2 9.7G 1.9G 7.3G 21% /var
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-local
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-queue
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-remote
tmpfs 501M 668K 500M 1% /usr/local/psa/handlers/info
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/spool

As you can see /home is currently using 110GB, but when I run du -chs /home/* I get this

32K /home/bin
4.0K /home/config.cache
8.0K /home/ftp
16K /home/lost+found
3.4G /home/mailnames
44K /home/mirror
6.1M /home/PEAR
8.0K /home/serverbackups
2.7G /home/server_backups
8.0K /home/tmp
14G /home/varwww
20G total

So as far as I can see only 20GB is being used... so where is the other 90GB going??

glennj
Posts: 3
Joined: 2009/12/09 20:48:43

Re: Missing disk space, please help

Post by glennj » 2009/12/09 21:51:33

OK, a reboot fixed the problem and the space was released.

df -h now shows

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.9G 1.1G 3.6G 24% /
none 501M 0 501M 0% /dev/shm
/dev/sda7 122G 19G 97G 17% /home
/dev/sda6 981M 18M 914M 2% /tmp
/dev/sda3 7.7G 5.1G 2.3G 70% /usr
/dev/sda2 9.7G 1.9G 7.3G 21% /var
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-local
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-queue
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/before-remote
tmpfs 501M 684K 500M 1% /usr/local/psa/handlers/info
tmpfs 501M 0 501M 0% /usr/local/psa/handlers/spool


Anyone know how I can free up the space without doing a scary reboot?

glennj
Posts: 3
Joined: 2009/12/09 20:48:43

Re: Missing disk space, please help

Post by glennj » 2009/12/09 23:04:36

Answering my own post now!

Turns out even if you delete files, processes can still keep hold of them and so inturn the disk space.

Restarting Apache in my case released the space!

I used the following command to work it out

lsof | grep virtualmin

Of course, change "virtualmin" to something that will match the files you deleted. :-D

Post Reply

Return to “CentOS 4 - Server Support”