Linux system Everything is a file, the system does not use the file name, and use the Inode number to identify the file, a file must occupy an inode, because each file must have an inode, it is possible that the inode has been exhausted, but the hard disk is not full of circumstances, This can cause new files to be created on the hard disk.
First, prepare the lab environment, create a new hard disk, use the Fdisk tool to build a partition/dev/sdb1 with approximately 5M of memory, format it, and mount it to the/data directory, using the DF command with the "-I" option to confirm the usage of nodes in the partition.
Then write a test program that runs the program to drain all the available I nodes in the/DEV/SDB1 partition.
Then, when the I node is exhausted, when a new file is created in the/DEV/SDB1 partition, a "No space on the device" error message appears. By using the DF command, you can see that there is virtually any remaining space available in the/DEV/SDB1 partition, but you cannot create a new file because the node is exhausted.
Finally fix I node exhaustion failure, delete the small file that consumes a lot of I node.
Linux inode exhaustion Failure handling