-1

Output of df -kh

[root@mavdu ~]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       2.9G  2.9G     0 100% /
devtmpfs        5.7G     0  5.7G   0% /dev
tmpfs           7.7G     0  7.7G   0% /dev/shm
tmpfs           7.7G   26M  7.7G   1% /run
tmpfs           7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/sda6        20G  928M   18G   5% /media/sda6
/dev/sda2       2.9G  9.0M  2.8G   1% /media/sda2
/dev/sda3       2.9G  9.0M  2.8G   1% /media/sda3
/dev/sda5       488M  780K  452M   1% /media/sda5
tmpfs           1.6G     0  1.6G   0% /run/user/0

Output of df -i

[root@mavdu ~]# df -i
Filesystem      Inodes IUsed   IFree IUse% Mounted on
/dev/sda1       196608 33787  162821   18% /
devtmpfs       1490183   386 1489797    1% /dev
tmpfs          2016765     1 2016764    1% /dev/shm
tmpfs          2016765   633 2016132    1% /run
tmpfs          2016765    16 2016749    1% /sys/fs/cgroup
/dev/sda6      1332688   633 1332055    1% /media/sda6
/dev/sda2       196608    11  196597    1% /media/sda2
/dev/sda3       196608    11  196597    1% /media/sda3
/dev/sda5        32768    11   32757    1% /media/sda5
tmpfs          2016765     1 2016764    1% /run/user/0

can any one help me out???

2 Answers2

2

You are simply comparing disk space usage df -kh with inode usage df -i which are two different things.

Khaled
  • 36,533
  • 8
  • 72
  • 99
2

TL;DR You're not comparing the same thing.

df -kh is providing disk space usage in a human readable format (the h switch) in a block size of (probably) 1k instead of 1024.

Display values are in units of the first available SIZE from --block-size, and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE may be (or may be an integer optionally followed by) one of following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

df -i lists the inode usage instead of the block usage. Inodes store information about the file, like where data is stored, or who the owner is.

Inodes are a finite resource and you can run out of them, preventing you from creating a file even if you have plenty of disk space available. From the two commands you used your root drive is out of data blocks (storage) but has plenty of inodes remaining.

References

df Man Page
Inodes
What is an Inode

kenlukas
  • 3,101
  • 2
  • 16
  • 26