Web Hosting Talk







View Full Version : Simple Harddrive space question


Kakashi
07-31-2004, 01:39 PM
i have a server with servermatix and for some reason cpanel status shows the space in each major folder :

Disk sda7 (/) 92 %
Disk sda1 (/boot) 33 %
Disk sda5 (/home) 8 %
Disk sda6 (/tmp) 4 %
Disk sda2 (/usr) 27 %
Disk sda3 (/var) 9 %

As you can see sda7 (/) is flashing red now. However i don't know what to delete in order for it to go green again. I am guessing its the base directory but i haven't installed anything at all so i have no idea why the percentage used would have gone up overtime.

I would have thought logs , but those are located in /var/logs and i deleted a few but it made sda3 (/var) 's percentage down.

Any Ideas ? :)

Thanks for your help

Arsalan
07-31-2004, 01:56 PM
try an "ls" in "/" as root. Compare the list of the results you get with the folders you have listed here and you would be able to find the folders using the extra space.

Basically SM has divided your drive in partitions (like /var, /tmp) unlike some providers which just make two partitions (/ and /home)

hiryuu
07-31-2004, 05:35 PM
ls only works if the new files are in the root level. A better scan would be
find / -xdev -mtime -120

That looks for for files that have changed in the last 120 days, but it won't cross into another partition (device). I suspect you will see quite a bit from /etc, but clearing space in there is difficult and dangerous. (Same goes for /bin, /lib, and /sbin .)

WCHost
07-31-2004, 10:54 PM
you probably see a large file in

/etc/httpd/logs/error_log
/etc/httpd/logs/access_log
etc....

farpost
08-01-2004, 12:39 AM
ssh to your server, and find what are the files/directories consume the spaces, following commands will help you:

cd / - go root (change current directory to root)
ls -lH - will show you files & sizes
du -sH * - will show you files & directory sizes (please note this command may take some time to execute and load your server - since it scans all subdiretories from the current directory)

Kakashi
08-01-2004, 05:09 PM
thank you for your help. managed to find the files , most were located in etc/httpd/ and a few others dotted around.
Thanks again