1

My server have disk space however its showing disk space is full.

This is bare-metal server and deleted many files but still showing disk is full

Please check below outputes:

[root@host1 tmp]# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.9G     0  7.9G   0% /dev
tmpfs           1.6G   24M  1.6G   2% /run
/dev/nbd0        46G   19G   25G  43% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
tmpfs           1.6G     0  1.6G   0% /run/user/0
tmpfs           1.6G     0  1.6G   0% /run/user/10001

second output:

[root@host1 tmp]# df -i /
Filesystem      Inodes   IUsed IFree IUse% Mounted on
/dev/nbd0      3055616 3055614     2  100% /

2 Answers 2

3

The inodes can get 100% if you have a lot of very small files (conceptually inodes are total number of files and directory the file system can have). Try to find such files. You could use example using for i in /*; do echo $i; find $i |wc -l; done, and then digging deeper in the hierarchy, like for i in /usr/*; do echo $i; find $i |wc -l; done. If for a directory you do not get the number of files for a long time, there is a good indication there is the problem.

1
  • Really great job man, it was a number of inodes issues. <3 you
    – Shiv Singh
    Jul 18, 2018 at 11:38
0

Every file and every directory on your file system has an inode, which describes the file or directory (owner data, permission data, file system blocks, etc.)

Every inode takes up 256 bytes of data on your filesystem, and on some file systems, like ext3 and ext4, the amount of inodes is fixed during file system creation.

This means that if you have many, many small files, the total amount of space consumed by both the small files and the inodes together could be lower than the total amount of disk space, but your disk still might be considered 'full' because there are no more inodes to describe new files in.

The xfs file system - which incidentally is the default for RHEL7 (and derivatives, I think) - does not specify an upper limit for the amount inodes, but for a maximum amount of disk space all inodes can consume together. The default is 25%, at least on my Fedora box, which allows for a humongous amount of inodes.

That means that on xfs, you would probably have much less of a problem with running out of inodes.

Do as vladmihaisima suggests and find where all those inodes went. My guess is they are somewhere in your /tmp, /home or /var directories, because those are user writable to some extent, and you do not seem to have them on separate partitions.

Then, on your next box, use xfs :)

2
  • Thanks, i have got same correct answer by @vladmihaisima
    – Shiv Singh
    Jul 18, 2018 at 11:32
  • Yeah, just trying to provide some extra background for posterity :)
    – wzzrd
    Jul 18, 2018 at 14:22

You must log in to answer this question.

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