Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem with too many inodes? Good number of inodes to set during format?

Posted on 2014-12-31
7
Medium Priority
?
400 Views
Last Modified: 2015-01-05
We are running several computers with Ubuntu Server 12.04 64 bit. In each of our systems we have seven 3TB hard disks in a RAID-5, for a total of 18TB of usable space. This space is used to store millions of JPG files to retain security camera footage using the free digital video recorder software Zoneminder. We format the single 18TB partition using FDISK and use the following command to create the EXT4 partition:
mkfs.ext4 -i 8192 /dev/sd[x]

Open in new window


For me, this results in 2,197,635,072 inodes, or 1,024 inode blocks per group (whatever that means). This is considerably more than necessary since my disk is full and I have the desired retention I need, yet still have 2,038,999,823 inodes. So this means I really only need about 200,000,000 or less inodes. My issue is i'm not sure how to format the partition to get around that desired amount of inodes.

I'm hoping someone here with good understanding of this can just give me the answer. The 8192 bytes per inode certainly gave us enough inodes, but a couple of my systems have been suffering from file system errors which I think may be related to possibly having too many inodes. One of the errors seen during a fsck was "inode #1718459210 has 14 multiply-claimed block(s), shared with 1 file(s)" and then it specifies the file.

How can I get this partition down to around 200,000,000 or less inodes? Using a calculation found here, I determined that I could set the bytes per inode value to 98,304. My question is, how many inodes will this give me and how will this affect my file system? What potential problems could arise? Is there a better number I could use?
20141231-095027-resized.jpg
0
Comment
Question by:LittleJohn101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 1000 total points
ID: 40526483
You need to run fsck on unmounted filesystem because your filesystem at least looks damaged.
And you need to create a new filesystem to change number of inodes.

-i can be popularily explained as average size of a file in filesystem. e.g 30k for maildir, say 2MB for jpeg images etc.
From mkfs manual:
Be warned that it is not possible to change this ratio on a filesystem after it is created, so be careful deciding the correct value for this parameter.
0
 
LVL 80

Accepted Solution

by:
arnold earned 1000 total points
ID: 40526793
You've defined during the partition that you want an inode for every 8192 bytes. (8k/inode)

tunefs there are different way to tune the storage system, one if you expect large/binary files which I believe zoneminder is using large data files. since the system is setup, you can reprioritize for space, versus time. tunefs -o space after you run tunefs -p or dumpfs and look at the current configuration.

In this case you would use -i 65536 or even 131072.
note that a one byte file will consume the 65536 or 131072 bytes respecively in this type of configuration.

Gheist already pointed out that a per inode change can only be done at the begining.
having too many inodes has little to no impact on your system, it just consume a bit more of your storage. A too few inode configuration on a volume will mean that you have the space, but lack the inodes that are needed to bind the files to the space.
(ran out of inodes).
0
 

Author Closing Comment

by:LittleJohn101
ID: 40531542
Great explanations. Thanks for the help.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:LittleJohn101
ID: 40531552
The drive needs to store about 170,000 JPEG files that range from about 40,000 bytes to 55,000 bytes. I think i'll set bytes per inode to 32,768. Any more, and I probably won't have enough inodes.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40531903
Best is to not set anything and use filesystem that does not limit inodes like XFS (default in RHEL7, usable with Debian* too, not for root FS on RHEL6)
0
 
LVL 80

Expert Comment

by:arnold
ID: 40531954
18TB /64k = 3 million inodes more than 170,000 files that you are looking at.

The only time a system runs out of inodes, is when it is setup to store huge files, but instead there are small 1k files instead and I've only seen it once, on a storage system Netapp, where inodes can be increased when needed without reformating the storage space.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40532115
XFS " 18TB/0 = unlimted number of inodes.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question