I'm running an FreeBSD dedicated server. I am getting messages that I have ran out of space on the device. df -h is saying that I have no space left but du -sh /* doesn't even show the directiories with a size that the df -h is showing.

df -h output:

# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s1a     18G     17G   -2.9M   100%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad4s1b    1.8T    379G    1.2T    23%    /home
linprocfs      4.0k    4.0k      0B   100%    /usr/compat/linux/proc
procfs         4.0k    4.0k      0B   100%    /proc
devfs          1.0k    1.0k      0B   100%    /var/named/dev

Its showing that / partition is full, however du -sh don't even show that huge directories (not even a 4GB is being taken):

# du -sh /*
8.0k    /COPYRIGHT
1.2M    /bin
416M    /boot
  0B    /compat
2.5k    /dev
  2M    /etc
8.4M    /lib
3.7M    /libexec
2.0k    /media
2.0k    /mnt
  0B    /proc
5.1M    /rescue
3.7M    /root
5.8M    /sbin
  0B    /sys
2.9M    /tmp
2.5G    /usr
662M    /var

Additional, df -i output:

# df -i
Filesystem   1K-blocks      Used      Avail Capacity iused     ifree %iused  Mounted on
/dev/ad4s1a   19834638  18247768        100   100%  253233   2313933   10%   /
devfs                1         1          0   100%       0         0  100%   /dev
/dev/ad4s1b 1871693806 397838408 1324119894    23%   87535 241862159    0%   /home
linprocfs            4         4          0   100%       1         0  100%   /usr/compat/linux/proc
procfs               4         4          0   100%       1         0  100%   /proc
devfs                1         1          0   100%       0         0  100%   /var/named/dev

What is the problem?

  • Pay attention, du -sh /* doesn't show the size of the hidden folders and files in root folder. you may have /.snap or like that – Nik Jul 23 '14 at 19:28
  1. perhaps, you clean up apache's logs recently? if so, try to restart apache after that as well and you should regain your space back.
  2. run fsck as your filesystem may be corrupted.

few ways to clean up your logs:

  • setup logrorate (better way).
  • echo > $FILE (dirty way).
  • Oh. I was cleaning up nginx logs to be exact... Restarted the service and it worked, didn't know its locking the space its using :) Thank you. – Lucas Jul 23 '14 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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