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

I'm getting out of disk space after setting the cpanel to backup to /backup I have deleted /backup but the partition size still increase

How can I find/delete the files that are taking the space on my partition?

Filesystem            Size  Used Avail Use% Mounted on
/dev/md2             1016G  949G   17G  99% /
proc                     0     0     0   -  /proc
none                     0     0     0   -  /dev/pts
/dev/md1              496M   66M  406M  14% /boot
/dev/md3              1.7T  634G 1004G  39% /home
none                     0     0     0   -  /proc/sys/fs/binfmt_misc
/usr/tmpDSK           485M   13M  447M   3% /tmp
/tmp                  485M   13M  447M   3% /var/tmp
share|improve this question

2 Answers 2

up vote 3 down vote accepted

Note that deleting /backup may not have actually freed up disk space, if the backup process hold open file handles in that directory.

Do the commands as suggested by Anagio. If you have a large discrepancy in what that reports and what the "df" is reporting, you may have open handles.

In that case, install "lsof" and run that to look for "deleted" files or big files, and the processes holding those open. You most likely will have to kill those processes before space is released.

The other place that tends to have big and growing files will be /var/log. If that's the case, you may have to zero out those files (you can delete, but you'll need to HUP the processes opening the logs; alternatively, you can do "cat /dev/null > /var/log/offending/log/file" to zero the file out). In the long term, you should set up logrotation and monitoring.

share|improve this answer
1  
once you get lsof installed you can do "lsof | grep deleted" to get a list of files that are open but have been deleted. –  ckliborn Jan 25 '12 at 3:52
    
"Note that deleting /backup may not have actually freed up disk space, if the backup process hold open file handles in that directory." that was the problem, the backup system was still holding the files. Thank you –  Diego Vieira Jan 25 '12 at 10:57

You can try du -sc /* | sort -nr to sort folders by size. I would also run a search for any of the backup files that were created. Maybe they were also copied to another folder.

share|improve this answer
1  
That du command will also include things from filesystems other than the one you're interested in -- a better option might be du -sx --max-depth=1 / | sort -nr. –  jgoldschrafe Jan 25 '12 at 2:38
    
Thank you Anagio, very handy command –  Diego Vieira Jan 25 '12 at 10:58

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.