LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 12-11-2015, 04:41 AM   #1
luke79
LQ Newbie
 
Registered: May 2015
Posts: 6

Rep: Reputation: Disabled
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.
 
Old 12-11-2015, 05:38 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by luke79 View Post
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 View Post
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.
 
2 members found this post helpful.
Old 12-11-2015, 07:01 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Realistically, you need to find a better thing to do with all those log and trace files. For instance, you could put them into a database table . . .
 
2 members found this post helpful.
Old 12-11-2015, 07:17 AM   #4
luke79
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
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) ?

Last edited by luke79; 12-11-2015 at 07:47 AM.
 
Old 12-11-2015, 08:34 AM   #5
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
Quote:
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.
 
1 members found this post helpful.
Old 12-11-2015, 08:37 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by luke79 View Post
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]).
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
inode full INDy2k Linux - Server 5 05-03-2015 05:58 AM
Full inode table ext3 fabio.vannini Linux - General 3 12-28-2011 09:10 AM
General Partitioning Limits: How full is too full to partition? orangesky Linux - Hardware 1 12-05-2009 06:27 PM
Posting guidelines... Answering guidelines? itsjustme LQ Suggestions & Feedback 14 07-22-2005 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration