When you get a "filesystem is full" error, but 'df' shows there is free space, what is the problem

When you get a "filesystem is full" error, but 'df' shows there is free space, what is the problem?

It is possible that we have free storage space but still we cannot add any new data in file system because all the Inodes are consumed. the df -i command will show that. This may happen in a case where file system contains very large number of very small sized files. This will consume all the Inodes and though there would be free space from a Hard-disk-drive point of view but from file system point of view no Inode available to store any new file.
A storage unit can contain numerous small files. Each file takes up 128 bytes of the inode structure. If the inode structure fills up before the data storage of the disk, no more files can be copied to the disk. Once inode storage is freed in the structure, the storage unit can have files written to it again.
# touch test-file
touch: cannot touch 'test': no space left on device

# df -Th
Filesystem     Type      Size  Used Avail Use% Mounted onFilesystem  
udev           devtmpfs  3.9G     0  3.9G   0% /dev
tmpfs          tmpfs     788M   10M  778M   2% /run
/dev/sda6      ext4       44G   24G   18G  59% /
/dev/sda7      ext4      103G   74G  24.0G 71% /home
/dev/sda2      vfat       95M   29M   67M  31% /boot/efi

# df -i
Filesystem       Inodes   IUsed    IFree IUse% Mounted on
udev            1002898     650  1002248    1% /dev
tmpfs           1008079    1128  1006951    1% /run
/dev/sda6       2875392  617635  2257757   22% /
/dev/sda7       6815744   80342  6735402  100% /home
you can see that in /dev/sda7 we have available space but because of inodes full, we can't create any file on the disk.