LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Disk Full (https://www.linuxquestions.org/questions/linux-general-1/disk-full-4175448370/)

OtagoHarbour 02-02-2013 02:11 PM

Disk Full
 
I am using Ubuntu 11.10 and my disk usage analyzer says that 441.4 GB out of an available 467.9 GB is being used. But the room directory only shows 18.4 GB with 100% usage. Typing df at the / directory shows

Quote:

/dev/sda6 456890664 433681912 0 100% /
There was a huge file, /var/log/apache2/error.log which which may have been close to 400 GB and I deleted it and emptied the recycle bin. But I still have 433681912 kb of disk space in use.

I typed

Code:

sudo find / -type f -size +1000000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'
but all I got back was

Quote:

/proc/kcore: 1020M
I would be most grateful for any assistance.
Peter.

yooy 02-02-2013 02:42 PM

there are no files but disk space is still used? same problem here on my mint/ubuntu install. Have tried rebootin? that solves problem here.

OtagoHarbour 02-02-2013 05:52 PM

Quote:

Originally Posted by yooy (Post 4883203)
there are no files but disk space is still used? same problem here on my mint/ubuntu install. Have tried rebootin? that solves problem here.

That fixed the problem. Thanks very much! The disk usage went from close to 100% to 8%. I wonder if there is a way to fix the problem w/o rebooting.

Thanks again,
Peter.

jefro 02-02-2013 08:35 PM

I was wondering that too.

sangfroid 02-03-2013 09:16 AM

Yupes there is way...

Actually, your apache server was holding that file even though you deleted it. That is why, you were seeing 100%usage still after deletion. If you had restarted ONLY apache process, you would have observed same results as if you had rebooted :)

Also, to avoid such issue in future, I will recommend you to rotate logs and zip them.

suicidaleggroll 02-03-2013 09:20 AM

The problem is even though you deleted the file, the reference to it was kept open because apache was still writing to it. Rebooting the computer obviously frees up that reference to give you the space, but you probably could have just restarted Apache and accomplished the same thing.

Edit: too slow...


All times are GMT -5. The time now is 05:43 AM.