General guidelines for preventing inode full issue
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
General guidelines for preventing inode full issue
OS : RHEL 6.5
Last week , one of our main applcation was down for nearly an hour because of inode getting full for /app filesystem.
This filesystem was 70GB in size and it was only 40GB utilized (30GB free). But, because of high number of log files and trace files , the inode has reached it max for this filesystem. We had to delete lots of these unwanted files to fix this.
Two questions :
1 . What will you do if the inode has maxed out for a filesystem and deleting small files does not fix the issue ?
2. Any guidelines to prevent inode getting full issue ? My colleague was saying that if you create the filesystem with higher block size , the inode maxing out issue can be prevented. Is this true?
Googling didn't help much . Hence posting it here.
1 . What will you do if the inode has maxed out for a filesystem and deleting small files does not fix the issue ?
This is not a very competent opinion, but I believe you have two options:
If you can extend the filesystem, do that. E.g. it resides on a logical volume, and there is still free space in the volume group. This is a quick fix but wasteful.
If not, backup, recreate (see point 2) and restore. Or simply copy it to a different filesystem with more inodes (again, point 2)
Quote:
Originally Posted by luke79
2. Any guidelines to prevent inode getting full issue ? My colleague was saying that if you create the filesystem with higher block size , the inode maxing out issue can be prevented. Is this true?
If this is an ext3 or ext4 filesystem, use the -i option when creating it. See man page. This option allows you to create the right number of inodes if you know the average file size.
Thank You Bernd.
If you can extend the filesystem, do that. E.g. it resides on a logical volume, and there is still free space in the volume group. This is a quick fix but wasteful.
You mean, number of inodes value will increase dynamically when the filesystem size is increased (LVM) ?
My colleague was saying that if you create the filesystem with higher block size , the inode maxing out issue can be prevented. Is this true?
True. But this will have counter effect to the usable space of the filesystem. Greater inode size can contain more metadata, but number of inodes should compliment the number of blocks. I don't know how mission-critical is your data, but if I were in that case, after back-up, I shall try to neutralize or reduce journal sizes.
Thank You Bernd.
If you can extend the filesystem, do that. E.g. it resides on a logical volume, and there is still free space in the volume group. This is a quick fix but wasteful.
You mean, number of inodes value will increase dynamically when the filesystem size is increased (LVM) ?
That's actually a good question. I can't confirm that right now. Perhaps somebody else can.
After increasing the underlying volume, you will also have to resize your filesystem with the resize2fs command (if it's ext[234]).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.