No free inodes left on Ext3/Ext4 filesystem
環境
- Red Hat Enterprise Linux (All Versions)
- EXT3, EXT4 file systems
問題
- My file system has plenty of space left, but I'm getting errors about a lack of inodes. How do I detect and fix this?
解決策
-
A new file system can be created with a higher
inodeto space ratio by using the-ioption inmke2fscommand:-i bytes-per-inode Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer inodes will be created. This value generally shouldn't be smaller than the blocksize of the filesystem, since in that case more inodes would be made than can ever be used. Be warned that it is not possible to expand the number of inodes on a filesystem after it is created, so be careful deciding the correct value for this parameter. -
Determine what is creating all the small files, and delete them if that is practical.
-
Add additional space to the device. The ratio will stay the same, but additional
inodeswill be added to the file system.
原因
-
Each file and directory uses an
inode. When the filesystem is created, a specific block ofinodesis created for that file system. If many small files are present, this can cause the pool ofinodesto be consumed prematurely. -
The number of used/free
inodescan be seen here:# df -i /dev/(device) -
Additional information about inode size and pool can be seen by using
dumpe2fs:# dumpe2fs /dev/(device) |grep ^Inode
このソリューションは、Red Hat のエンジニアがお客様のサポート中に作成したナレッジコンテンツの大型ライブラリーを提供する Fast-Track Publication Program の一環です。お客様が必要とする知識・情報を即時に提供するために、これらの記事は、未処理・未編集の状態で提示される場合がありますので、予めご了承ください。
コメント