What is taking up all the space on sda6?
Hi everyone,
I have run out of space in /var, and the following output confirms that there is no space on the partition mounted to /var. lukee@au-web-1:/var$ df –h Filesystem Size Used Avail Use% Mounted on /dev/sda1 327M 152M 158M 50% / tmpfs 2.0G 0 2.0G 0% /lib/init/rw udev 10M 808K 9.3M 8% /dev tmpfs 2.0G 390M 1.6G 20% /dev/shm /dev/sda9 249G 3.0G 234G 2% /home /dev/sda8 373M 11M 343M 3% /tmp /dev/sda5 4.6G 588M 3.8G 14% /usr /dev/sda6 2.8G 2.7G 7.0M 100% /var The next part is where it gets confusing. What is taking up all of the space? I examine /var with the following command: lukee@au-web-1:/var$ sudo du -skh /var 60M /var May I ask for some help in identifying what is taking up the remaining 2.7G or more on this filesystem? Thank you. |
sudo fsck /dev/sda6
sudo du -hs /var/* |
unmount /var
If it won't let you, reboot, or kill the processes using /var, then unmount it. Use "fuser -cu /var" to list the processes using it. THEN fsck. On the other hand, if you have a runaway process holding large files open, merely unmounting /var may fix your problem. |
mount -o remount,ro /var is better, IMHO.
|
Hi Leirith,
this link has a article which say every directory under /var. /var/log Log files from the system and various programs/services, especially login (/var/log/wtmp, which logs all logins and logouts into the system) and syslog (/var/log/messages, where all kernel and system program message are usually stored). Files in /var/log can often grow indefinitely, and may require cleaning at regular intervals. Something that is now normally managed via log rotation utilities such as 'logrotate'. This utility also allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job. This is a good place to start troubleshooting general technical problems. so please check the size of the /var/log. It may be possible that it's size may increase indefinitely. |
Thanks AlucardZero and everyone who replied. I ran AZ's and troop's advice and all looks well again.
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 327M 152M 158M 50% / tmpfs 2.0G 0 2.0G 0% /lib/init/rw udev 10M 808K 9.3M 8% /dev tmpfs 2.0G 46M 1.9G 3% /dev/shm /dev/sda9 249G 3.0G 234G 2% /home /dev/sda8 373M 11M 343M 3% /tmp /dev/sda5 4.6G 563M 3.9G 13% /usr /dev/sda6 2.8G 159M 2.5G 6% /var |
Hey folks,
The problem seems to have resurfaced since I performed the above commands. Something is slowly filling sda6 and /var is staying the same size. Could anyone offer insight into how this could be happening, and what to do about it? Thanks! |
what I do to track down what is taking up space is to use the command:
sudo du -a -h --max-depth=1 this will show you the size of all files and folders in the current directory, just start from the root directory and look which dir has lots of space, cd to that directory and type the command again. note: you can do this without sudo, but it will probably spit out alot of "permission denied" errors as the command traverses all dirs. |
|
this helped me.. i had a process running. which when i killed it.. freed a lot of space.. thank you
|
All times are GMT -5. The time now is 03:24 AM. |