Hong Manh's BlogHong Manh's Blog Sharing Technology Knowledge

How to check inodes on the Linux server

As you all know, the inode is very parameter important on the Linux VPS. This parameter is understood as the number of files and files contained on the hard drive and this parameter will be limited depending on the specific system.

In some cases, the service reports the no space left on device…. error because there is no space left to store related files and files, performing a hard drive space check with the df -h command shows that the hard drive space is still free.

In this case, you need to check the inode parameter by executing the df -i command

inodes full 1
In the image above, you will see the number of INODES is 100% full

The IUSER% column shows a parameter of 100%, which means that the maximum number of files allowed to be stored has reached the maximum limit.

To get the system working properly again, you will need to release the inodes parameter. First, you need to check and determine the directory, which path is occupying the highest inodes parameter, thereby identifying unnecessary files and directories and deleting them.

You can check the details with the following command:

find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

inodes full 2

After identifying the file, folder that occupies many inodes, you can delete and leave more INODES empty.

Wishing you success!

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Press ESC to close

0
Would love your thoughts, please comment.x
()
x