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.

Installed ZPanel on CentOS 6. Mails, mysql and files may use ~ 100 mb. Now see that all files uses disk space ~ 6 Gb.

Tried with ncdu and see this http://jmp.sh/v/1dnKe4SUVzSk06026tJg

How to see what is using ~ 6 Gb (some list with big size files)?

With df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs             10G  6.7G  3.4G  67% /
none                   16G  4.0K   16G   1% /dev
none                   16G     0   16G   0% /dev/shm

Tried find /root -type f -size +1000k -exec ls -lh {} \; | awk '{print $5 ": " $NF}' See nothing.

Tried

# du -hs /
du: cannot access `/proc/18577/task/18577/fd/4': No such file or directory
du: cannot access `/proc/18577/task/18577/fdinfo/4': No such file or directory
du: cannot access `/proc/18577/fd/4': No such file or directory
du: cannot access `/proc/18577/fdinfo/4': No such file or directory
6.7G    /

Tried

du -sh /*
6.0M    /bin
12K     /boot
4.0K    /dev
67M     /etc
4.0K    /home
23M     /lib
4.0K    /lost+found
4.0K    /media
4.0K    /mnt
4.0K    /opt
du: cannot access `/proc/18689/task/18689/fd/4': No such file or directory
du: cannot access `/proc/18689/task/18689/fdinfo/4': No such file or directory
du: cannot access `/proc/18689/fd/4': No such file or directory
du: cannot access `/proc/18689/fdinfo/4': No such file or directory
0       /proc
184K    /root
7.0M    /sbin
4.0K    /selinux
4.0K    /srv
0       /sys
8.0K    /tmp
780M    /usr
5.8G    /var

So, need to check /var

Ohhhh 5.5G /var/zpanel/logs. Crazy... Need to disable logs (or set limit)

share|improve this question
    
du -hs /, then du -hs /large-directory, then du -hs /large-directory/large-subdirectory. Repeat until you've found which deep directory is unexpectedly large. –  ceejayoz Aug 27 '13 at 16:00
    
Tried, but get cannot access –  user2118559 Aug 27 '13 at 16:07
    
Do it with sudo then. –  ceejayoz Aug 27 '13 at 16:08
    
Get like this usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] But have no knowledge what to do with it... –  user2118559 Aug 27 '13 at 16:12
    
Sorry, I slightly mucked up my example. sudo is pretty basic sysadmin stuff. Try sudo du -hs /*, then sudo du -hs /large-directory/*, and so on. Some "no such file or directory" messages are normal. –  ceejayoz Aug 27 '13 at 16:19
show 2 more comments

1 Answer

up vote 2 down vote accepted

Your ncdu image is pretty much useless to us as it shows us the contents of root's home directory /root. You should try using it on / and work down from there.

Alternatively you can try

du -h --max-depth=1 / 

Take a careful look at the output to determine which directories are holding all the data. Lets assume it's /var, so

cd /var
du -h --max-depth=1 .

rinse and repeat until you find the files eating the disk space. If you can't seem to find and files that fit the bill then it could be that they have been deleted but not yet released by the program writing to them to try

lsof +L1 /

which will list open files that have been deleted. You will need to determine which process has the file open and restart it to get it to release the file.

share|improve this answer
    
For example if see httpd 15739 apache txt REG 146,70 341712 1 20484703 /usr/sbin/httpd it means that need to service httpd restart? –  user2118559 Aug 27 '13 at 16:45
add comment

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.