You are on page 1of 16

10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux


Menu


Menu 

How to Increase Disk Inode Number in Linux

Ravi Saive Last Updated: January 9, 2020 Linux Commands 9 Comments

When a new file system is created on a partition on a disk in Linux, and the kernel keeps aside space for
Ad
inodes during the initial structuring of the file system. The number of inodes within a file system directly
Trusted Partners In Your City
affects the number of files (i.e the maximum number of inodes, and hence the maximum number of files, is
set when the file system is created).
NoBroker.Com Open

Recommended Read: How to Get Total Inodes of Root Partition

If all inodes in a file system are exhausted, the kernel can not create new files even when there is available
space on the disk. In this short article, we will show you how to increase the number of inodes in a file
system in Linux.

When creating a new file system on a partition, you can use the -i option to set the bytes-per-inode
(bytes/inode ratio), the larger the bytes-per-inode ratio, the fewer inodes will be created.

The following example shows how to create an EXT4 file system type with a small bytes-per-inode ratio
on a 4GB partition.

$ sudo mkfs.ext4 -i 16400 /dev/sdc1

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 1/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Create EXT Filesystem with Smaller Inode Ratio

Ad
Trusted Partners In Your City

NoBroker.Com Open

Learn Linux in One Week and Go From Zero to Hero - Get This Book

Note: Once the file system is created, you can not change the bytes-per-inode ratio (unless you re-format
it), and resizing a filesystem changes the number of inodes to maintain this ratio.

Here is another example with a larger bytes-per-inode ratio.


Ad
Trusted Partners In Your City

$ sudo mkfs.ext4 -i NoBroker.Com


196800 /dev/sdc1
Open

Create EXT Filesystem with Larger Inode Ratio

Besides, you can also use the -T flag to specify how the filesystem is going to be used so that 
mkfs.ext4 can choose optimal filesystem parameters for that use including the bytes-per-inode ratio.
https://www.tecmint.com/increase-disk-inode-number-in-linux/ 2/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

The configuration file /etc/mke2fs.conf contains the different supported usage types and many other
configurations parameters.

In the following examples, the command tells that the file system will be used to create and/or store
largefile and largefile4 which offer more relevant ratios of one inode every 1 MiB and 4 MiB respectively.

$ sudo mkfs.ext4 -T largefile /dev/device

OR

$ sudo mkfs.ext4 -T largefile4 /dev/device

To check the inode usage of a file system, run the df command with the -i option (the -T option
shows the file system type).

$ df -i

OR

$ df -iT

Ad
Trusted Partners In Your City

NoBroker.Com Open

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 3/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Ad
Trusted Partners
Check File System In Your
Inode UsageCity
in Linux

NoBroker.Com Open
We would like to know your thoughts about this article. Use the feedback form below to reach us. For
more information, see the mkfs.ext4 manpage.

 Commandline Tools , Linux Tricks

 How to Secure Nginx with Let’s Encrypt on How to Set Up a Local Yum/DNF Repository on
CentOS 8 CentOS 8 

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or
doubts? do ask for help in the comments section.

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 4/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Super Silent TVS iQube Scooter


Hassle-free ownership experience, 60 mins charge, smooth & super silent riding experience. Open
TVS iQube Electric

If You Appreciate What We Do Here On TecMint, You Should


Consider:

TecMint is the fastest growing and most trusted community site for any kind of
Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to
search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a
token of appreciation.

Ad
Trusted Partners In Your City
We are thankful for your never ending support.
NoBroker.Com Open

Related Posts

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 5/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

15 Practical Examples of ‘echo’ command in Linux

Ad
Trusted
15 Basic ‘ls’ Command Examples Partners
in Linux In Your City

NoBroker.Com Open

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 6/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

3 Ways to Find Out Which Process Listening on a Particular Port

Ad
Trusted Partners In Your City

NoBroker.Com Open

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 7/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

16 Top Command Examples in Linux [Monitor Linux Processes]

10 Commands to Collect System and Hardware Info in Linux

Ad
Trusted Partners In Your City

NoBroker.Com Open

10 sFTP Command Examples to Transfer Files on Remote Servers in Linux

9 thoughts on “How to Increase Disk Inode Number in


Linux”

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 8/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Anup Singh
November 13, 2020 at 8:12 am

How Can I Increase Disk Inode Number Without Format Disk Or Using editing /etc/mke2fs.conf?

Please Let Me Know,

Thanks

Reply

Ravi Saive
November 13, 2020 at 12:11 pm

@Anup,

The number of inodes cannot be increased without formatting the disk.

Reply
Ad
Trusted Partners In Your City

NoBroker.Com Open

Br. Bill
November 9, 2020 at 11:15 pm

Are there any filesystems that have dynamically allocated inode storage that can be increased
on-demand, instead of fixed inode storage, which in this day and age seems quaint and kind of
dumb?

Reply

Kyle Foley
February 12, 2020 at 10:56 am 

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 9/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Never mind I got it when I reread “When creating a new file system on a partition, you can use the
-i option to set the bytes-per-inode (bytes/inode ratio), the larger the bytes-per-inode ratio, the
fewer inodes will be created.”

Reply

Kyle Foley
February 12, 2020 at 10:53 am

Is the number after i a ratio or an integer. For example, will the number create exactly that
amount of inodes or a number divided by the size of the disk?

Reply

Rafael Pereira Ribeiro


January 2, 2021 at 3:02 pm

Ad
Trusted
Anyone can explain basically Partners
what is an inode?In Your City

NoBroker.Com Open
Reply

Ravi Saive
January 4, 2021 at 9:35 am

@Rafael,

An inode is a data structure that is used to store information of files on your Linux system. The
number of inodes shows the number of files and directories you have on the system.

Reply

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 10/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Jalal
January 14, 2020 at 3:13 pm

Hi,

Very nice and useful article

thanks a lot

Reply

Aaron Kili
January 17, 2020 at 9:38 am

@Jalal

Many thanks for the useful feedback.

Reply
Ad
Trusted Partners In Your City

NoBroker.Com Open

Got something to say? Join the discussion.


Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that
all comments are moderated and your email address will NOT be published.

Name * 

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 11/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Post Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Over 3,500,000+ Readers

Ad
Trusted Partners In Your City

NoBroker.Com Open

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 12/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Ad
Trusted Partners In Your City

NoBroker.Com Open
A Beginners Guide To Learn Linux for Free [with Examples]

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 13/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

TEF Exam
Preparation

in Delhi
School of French:

Learn French, Live

French, Speak

French

School of French

Open

Ad
Trusted Partners In Your City

NoBroker.Com Open
Red Hat RHCSA/RHCE 8 Certification Study Guide [eBooks]

Linux Foundation LFCS and LFCE Certification Study Guide [eBooks]

Learn Linux Commands and Tools

Dtrx – An Intelligent Archive Extraction (tar, zip, cpio, rpm, deb, rar) Tool for Linux

How to Encrypt and Decrypt Files and Directories Using Tar and OpenSSL

6 Useful X-based (Gui Based) Linux Commands – Part II



How to Make File and Directory Undeletable, Even By Root in Linux

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 14/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

How to Run Shell Scripts with Sudo Command in Linux

Best Command Line Language Translators for Linux

Ad
Trusted Partners In Your City
If You Appreciate What We Do Here On TecMint, You Should Consider:
NoBroker.Com Open

Linux Server Monitoring Tools

9 Useful Commands to Get CPU Information on Linux

3 Ways to Check Apache Server Status and Uptime in Linux

How to Install Nagios 4 in Ubuntu and Debian

Install OpenNMS Network Monitoring Tool in CentOS/RHEL 7



Will ‘Htop’ Replace Default ‘Top’ Monitoring Tool in Linux?
https://www.tecmint.com/increase-disk-inode-number-in-linux/ 15/16
10/9/21, 5:51 AM How to Increase Disk Inode Number in Linux

Bashtop – A Resource Monitoring Tool for Linux

Learn Linux Tricks & Tips

How to Christmassify Your Linux Terminal and Shell

How to Create Multiple User Accounts in Linux

10 Interesting Linux Command Line Tricks and Tips Worth Knowing

How to Start Linux Command in Background and Detach Process in Terminal

How to Disable/Lock or Blacklist Package Updates using Apt Tool

bd – Quickly Go Back to a Parent Directory Instead of Typing “cd ../../..” Redundantly

Best Linux Tools

13 Best Photo Image Editors for Linux

27 Best IDEs for C/C++ Programming or Source Code Editors on Linux

18 Best NodeJS Frameworks for Developers in 2020

Top 3 Open-Source Cross-Distribution Package Management Systems for Linux

10 Best Flowchart and Diagramming Software for Linux

12 Best Notepad++ Alternatives For Linux

Donate to TecMint
Contact Us
Advertise on TecMint
Linux Services
Copyright Policy
Privacy Policy
Career

Sponsored Post

Tecmint: Linux Howtos, Tutorials & Guides © 2021. All Rights Reserved.
The material in this site cannot be republished either online or offline, without our permission.

Hosting Sponsored by : Linode Cloud Hosting

https://www.tecmint.com/increase-disk-inode-number-in-linux/ 16/16

You might also like