LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-11-2019, 03:53 AM   #1
HTop
Member
 
Registered: Mar 2019
Posts: 44

Rep: Reputation: Disabled
Increase the number of inodes


Hello,
I've got pretty much low on inode number on such filesystem:

[root@database01 ~]# tune2fs -l /dev/mapper/vg_u01-lv_u01
tune2fs 1.43-WIP (20-Jun-2013)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: b883c6e6-0467-11ea-9a9f-362b9e155667
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 6553600
Block count: 26213376
Reserved block count: 1310668
Free blocks: 7980028
Free inodes: 676695
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1017
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Filesystem created: Tue May 19 13:21:07 2017
Last mount time: Sat Apr 3 19:14:26 2019
Last write time: Sat Apr 3 19:14:26 2019
Mount count: 15
Maximum mount count: -1
Last checked: Tue May 27 19:47:04 2018
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 5578993
Default directory hash: half_md4
Directory Hash Seed: f8c197e2-0467-11ea-8d71-362b9e155667
Journal backup: inode blocks

The idea is to increase the number of inode, for such specific filesystems.
I know that I must create a new filesystem.

What if I double the number of inode? Is it possible to increase only by 50%?

Regards,
HTop
 
Old 11-11-2019, 05:15 AM   #2
sujitb
LQ Newbie
 
Registered: Dec 2018
Posts: 17

Rep: Reputation: Disabled
Increase the file system size first it will automatically value to inode..
 
Old 11-11-2019, 05:16 AM   #3
sujitb
LQ Newbie
 
Registered: Dec 2018
Posts: 17

Rep: Reputation: Disabled
Increase the file system size first it will automatically increase inode numbers..
 
Old 11-11-2019, 08:38 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,786

Rep: Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215
You can use the "-i" option in mkfs.ext{234} to specify the number of bytes per inode. Right now you have one inode per 16K bytes (4 blocks) and are using ~90% of your inodes but just ~70% of the data blocks, so it looks like you need a bytes-per-inode somewhat smaller than 16K. Yes, you need to re-make the filesystem to change that ratio.
 
Old 11-14-2019, 11:51 AM   #5
HTop
Member
 
Registered: Mar 2019
Posts: 44

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
You can use the "-i" option in mkfs.ext{234} to specify the number of bytes per inode. Right now you have one inode per 16K bytes (4 blocks) and are using ~90% of your inodes but just ~70% of the data blocks, so it looks like you need a bytes-per-inode somewhat smaller than 16K. Yes, you need to re-make the filesystem to change that ratio.
My idea is not to increase the size of the filesystem because I do not need extra space, but extra inodes.
If I set bytes-per-inode = 8K, I think maximum size of the partition becomes lower, or not?
 
Old 11-14-2019, 12:23 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,786

Rep: Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215
Quote:
Originally Posted by HTop View Post
My idea is not to increase the size of the filesystem because I do not need extra space, but extra inodes.
If I set bytes-per-inode = 8K, I think maximum size of the partition becomes lower, or not?
Smaller yes, but only by a tiny percentage. The inode size is 256 bytes, so doubling the number of inodes from the current 6553600 would use an additional 1600 MiB of space. That's about 1.56% of the total 102396 MiB used by the filesystem.
 
Old 11-15-2019, 09:23 AM   #7
HTop
Member
 
Registered: Mar 2019
Posts: 44

Original Poster
Rep: Reputation: Disabled
Doubling the inode space, inodes will fill 3200 MiB.
Does the inode space be counted on the reserved space (usually 5%) or is it extra?


Regards,
H.
 
Old 11-15-2019, 10:04 AM   #8
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by HTop View Post
Does the inode space be counted on the reserved space (usually 5%) or is it extra?
No, it isn't reserved but already used (the I-node table is PRE-allocated), so its size is subtracted from the total amount available (the I-node table is not a file, so isn't in the "used" amount. The journal IS a file, so its size is in the amount used.
With the command "tune2fs -l /dev/sd??" you can see how many I-nodes there are.
 
Old 11-15-2019, 11:01 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,786

Rep: Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215
Quote:
Originally Posted by HTop View Post
Doubling the inode space, inodes will fill 3200 MiB.
Does the inode space be counted on the reserved space (usually 5%) or is it extra?
It's part of the filesystem formatting overhead, which includes group descriptors, block bitmaps, and super blocks, as well as inode tables. That space is the reason that the space computed from the block total reported by df is less than the space represented by the "Block count" reported by "tune2fs -l". Example:
Code:
# tune2fs -l /dev/mapper/vg_sys3g-var | grep "Block count"
Block count:              14848000
# df -B 4k /var
Filesystem           4K-blocks    Used Available Use% Mounted on
/dev/mapper/vg_sys3g-var
                      14581811 3752428  10087303  28% /var
 
  


Reply

Tags
filesystems, inode



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Increasing number of inodes without re-creating the partition Turbocapitalist Linux - General 3 07-14-2011 01:46 PM
Any command available to find out the number of inodes available in the system? Marty21 Linux - Newbie 3 01-09-2009 07:31 PM
Number of inodes in formatting? lucmove Linux - General 7 12-20-2008 08:27 AM
massive increase in open inodes, why? fjallstrom Linux - Newbie 0 05-11-2006 06:27 PM
How do I increase kernel inodes in Red Hat 9 solking Linux - Distributions 0 02-19-2004 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:13 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