Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My partition /dev/sda1 keeps filling up. Besides the "/" directory, I cannot tell what directories are even on this partition in order to search for files to delete. I was able to get it down to 97% full yesterday, but already today it is as 100% again.

I did not set up this machine. But looks like /home is on /dev/sda6 (which has tons of space) so no problems there.

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              9611492   9059720     63532 100% /
tmpfs                 12368424         0  12368424   0% /lib/init/rw
udev                  12363580       172  12363408   1% /dev
tmpfs                 12368424         0  12368424   0% /dev/shm
/dev/sda6            452427328 146862508 282582832  35% /home
tmpfs                  2048000   1212456    835544  60% /mnt/ramdisk

EDIT: Still don't know why /dev/sda1 is filling up, but I"m now trying to delete unnecessary packages to free up disk space. However, it won't let me do anything with an apt-get command. It says:

The following packages have unmet dependencies:
 vim : Depends: vim-runtime (= 2:7.2.445+hg~cb94c42c0e1a-1) but it is not installed
E: Unmet dependencies. Try using -f.

This occurs also when I try install something.

EDIT 2: While rebooted got me down to 46% full, now just two days later I am back up to 62% full, and rising. What is filling up my disk?

EDIT 3: Looks like it's going up about 6% per day...already 68% full. That's about 60 mb/day.

EDIT 4: Looks like I am going up 0.03 MB/HR constantly. How can I tell what is filling and where?

share|improve this question
1  
Check /var/log directory –  xeon Sep 9 '13 at 0:09
    
Thanks, I did, but only free'd a little. –  Corepuncher Sep 9 '13 at 5:00

2 Answers 2

This command will give you a list of what is using your disk space, in largest to smallest order, without traversing onto other filesystems (so just / and anything sda1)

du -xkc / | sort -r -n | tee /home/diskusage.log
less /home/diskusage.log

It will take a while to run, but hopefully that gives you a better idea of what folders are using your disk space. The command dumps the output file to /home since you said it was on a different partition. The results are in KB.

Update: From what you're saying, the used diskspace doesn't equal the partition size; you might want to check for deleted files to see if there is anything big being held open. Deleted files won't be freed until they are closed. Use lsof to check for deleted files:

lsof -n | grep -i '(deleted)'

To free such files, close or restart the process that is holding those deleted files open.

share|improve this answer
    
Thank you. I ran it, and the "total" of / is 4100692, which doesn't seem very large. /usr tops the list with 3283184. The partition is 10 gb, and just filled up 300 mb since last night. Any way to get a list files or dir on /dev/sda1 ? Looks like / is not the only location. –  Corepuncher Sep 9 '13 at 0:28
1  
the -k option means 1K blocks. Still 4.1GB is too small. If you didn't run it as root, you might have had some permission denied stuff that might explain the difference too. –  Andrew Domaszek Sep 9 '13 at 0:36
    
I am root. Shows /dev/sda1 size 9611492 used 9051400. BTW, how do I paste code and get it formatted in the gray box? –  Corepuncher Sep 9 '13 at 0:39
    
Add your output from df -k to your question. –  Andrew Domaszek Sep 9 '13 at 0:39
    
prefix lines with 4 spaces to make it show as a code block. Run the lsof -n command looking for deleted files. The filesize in bytes is in column 8 –  Andrew Domaszek Sep 9 '13 at 0:46

You do not appear to have a separate /var partition. I would start looking there for run away logging.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.