1

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

2 Answers 2

3

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.

2
  • 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, 2012 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 Jan 25, 2012 at 10:57
2

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.

1
  • 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. Jan 25, 2012 at 2:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .