i-nodes In Linux
What is inode?
In computing, an index-node (inode) is a data structure on a traditional Unix-style file system such as UFS. An inode stores all the information about a regular file, directory, or other file system object, except its data and name.(as defined in Wikipedia)
The Inode is a
pivitol structure within the Unix filesystem. The purposes of an
inode is to hold all the information about a file you would normally
expect to see in a directory entry on another system - file size,
location, access & modification times, ownership, etc. To exist
in a filesystem every file must have a inode. Directories, symbolic
links, device files and pipes all have inodes.
When the inode table is
full so is your filesystem, no matter what 'df' is saying about
the amount of free space. The size of the inode table is fixed when
it is created, there is no command to extend it. Solaris users can
examine the state of their inode table using the 'df -e' command.
The
following example shows the Linux syntax;
root@root-pc:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda2 179520 75798 103722 43% /
How to Free Inode Usage
It's quite easy for a disk to have a large number of inodes used even if the disk is not very full.
An inode is allocated to a file so, if you have gazillions of files, all 1 byte each, you'll run out of inodes long before you run out of disk.
It's also possible that deleting files will not reduce the inode count if the files have multiple hard links. As I said, inodes belong to the file, not the directory entry. If a file has two directory entries linked to it, deleting one will not free the inode.
Additionally, you can delete a directory entry but, if a running process still has the file open, the inode won't be freed.
My initial advice would be to delete all the files you can, then reboot the box to ensure no processes are left holding the files open.
Comments
Post a Comment