My cpanel server has been e-mailing me about the /usr/ partition was running out of space but i neglected it. Now one of my websites has run out of bandwidth, and i need to change it but it says; 'The /usr, /, or /var partition on this server is running out of disk space. This WHM operation has been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition.' The 'df' command says; 'Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda6 8064304 7639928 14720 100% /usr' Any ideas how to resolve this so i can change my websites bandwidth limit? Help appreciated!
Delete some files from this partition. Some systems will keep logs on there too, so FTP them somewhere else and delete them or find anything else you can delete.
thanks for reply, but i don't know which files are going to be the big ones to delete, and what not to delete :\
Log files are usually stored in /var, so I'm surprised that /usr is full. Look to see where /usr/tmp is stored: use ls -ld /usr/tmp, and if it's a link to /var/tmp then you need to look elsewhere. If /usr/tmp really is on /usr/, then look inside that directory for large (or many) files that are older than a day. Here are some command that may help: > cd /usr/tmp > du -s * | sort -n Code (markup): Where is your actuall web site stored? On /usr or /home? Perhaps that's got too big...? Cryo.
Yes, it came up with; root@serv [/usr]# du -s * | sort 0 tmp 12 aquota.user 1320 kerberos 20 quota.user 24916 sbin 32648 X11R6 32 doc 32 man 4 games 4 lost+found 52 src 536844 share 555716 lib 57348 include 620616 local 8368 libexec 8 etc 95408 bin I'm geussing i have to clear up about 300mb but i dont know what to delete..
It brought up; 108 bandmin 14564 apache 1892 include 2676 gd-2.0.33 31672 frontpage 36 man 43928 lib 4 games 4 libexec 4 sbin 4 src 507344 cpanel 52 share 588 download 8292 bin 8 etc 9436 tt2 but i dont think i can delete lib/ or cpanel/ can i? ;\
I made a mistake. The command should have been | sort -n (sort by number). What's in /usr/share, /usr/local/apache and /usr/local/frontpage?
share/ looks like it holds files for the actual server as if it were a PC, e.g; anaconda/ java-1.4.0/ system-config-date/ application-registry/ java-1.4.1/ system-config-httpd/ applications/ java-1.4.2/ system-config-keyboard/ apps/ java-1.5.0/ system-config-language/ aspell/ javadoc/ system-config-lvm/ apache/ holds all apache config files etc, probably important I don't know whether /usr/share is needed on a server.....
Should probably keep /usr/share. Do you have access to the package management utility? Can you uninstall any packages that you know you don't need? For example, Documentation packages are safe to get rid of (though not terribly large). Is this server owned by you, or some other admin? Cryo. PS: The cPanel directory is very big at 500 Mb - is this usual? PPS: If you want to see the directory sizes in Kb or Mb, use du -sh *. This can't be sorted, though.
With all that I've seen so far, I still can't track where all the 8Gb of the partition went. You might have a problematic code that write to the disk but never closes the file, so the space is taken, but it doesn't show. you may want to restart a few services or reboot the server all together to see if this is the case.
the apache is important and it might also include the logs of the server..plus also look on the the logs of the cpanel...
hextraordinary make a very good point. Adding up all the bytes listed in post #7 for all of /usr, I get a total of 1.84 Gb. terryuk's original post shows that /dev/hda6 is a 7.68 Gb partition. (Tip: df -h is more readable). Something fishy here. Have you tried a reboot as hextraordinary suggested? Cryo.
Follow it closely the next few weeks, if you notice your disk space getting eaten up, that must be an application or script that writes into a file but never closes it. It might have been something you ran once a while ago but only now got your attention once it's eaten up your entire partition.