LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-13-2010, 04:13 AM   #1
oyo
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
how many bytes per inodes?


HI, I need to create a very high number of files which are not very large (like 4kb,8kb). It's not possible on my computer cause it takes all inodes up to 100% and I cannot create more files :

Code:
-bash-4.0$ df -i /dev/sda5
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda5            54362112 36381206 17980906   67% /scratch
(I started deleting files, it's why it's now 67%)


The bytes-per-nodes are of 256 on my filesystem (ext4)

Code:
-bash-4.0$ sudo tune2fs -l /dev/sda5 | grep Inode
Inode count:              54362112
Inodes per group:         8192
Inode blocks per group:   512
Inode size:           256
I wonder if it's possible to set this value very low even below 128(during reformating). If yes,what value should I use? Thx
 
Old 09-13-2010, 05:08 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by oyo View Post
HI, I need to create a very high number of files which are not very large (like 4kb,8kb). It's not possible on my computer cause it takes all inodes up to 100% and I cannot create more files :

Code:
-bash-4.0$ df -i /dev/sda5
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda5            54362112 36381206 17980906   67% /scratch
(I started deleting files, it's why it's now 67%)


The bytes-per-nodes are of 256 on my filesystem (ext4)

Code:
-bash-4.0$ sudo tune2fs -l /dev/sda5 | grep Inode
Inode count:              54362112
Inodes per group:         8192
Inode blocks per group:   512
Inode size:           256
I wonder if it's possible to set this value very low even below 128(during reformating). If yes,what value should I use? Thx
You can use -i option with mke2fs command.

Quote:
-i bytes-per-inode
Specify the bytes/inode ratio......
Read manpage for more details.

Regards,
 
Old 09-13-2010, 05:25 AM   #3
oyo
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thx,
yes I know about this option. I just wonder if I could set this value to 64 or 32 for instance. In mke2fs man page, it's said that
Quote:
This value generally shouldn't be smaller than the blocksize of the filesystem
. It's not mandatory, so I think I can
set this value very low. It's just to be sure that I'm not doing something wrong.
It will be a slow filesystem, but still operational no?
 
Old 09-13-2010, 06:00 AM   #4
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by oyo View Post
Thx,
yes I know about this option. I just wonder if I could set this value to 64 or 32 for instance. In mke2fs man page, it's said that
. It's not mandatory, so I think I can
set this value very low. It's just to be sure that I'm not doing something wrong.
It will be a slow filesystem, but still operational no?
-i option set block size.

Code:
# tune2fs -l /dev/sdb1
.......
Inode count:              50200
Block count:              200780
Reserved block count:     10039
Free blocks:              186617
Free inodes:              50189
First block:              1
Block size:               1024
.......
-I used to set inode size. You can't set it to below 128. (128 min)

Code:
mke2fs -I 64 /dev/sdb1
mke2fs 1.39 (29-May-2006)
mke2fs: invalid inode size 64 (min 128/max 1024)
Hope this help

Regards,
 
Old 09-13-2010, 07:08 AM   #5
oyo
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Yes,
I didn't read the entire man page..... :/
Quote:
The inode-size value must be a power of 2 larger or equal to 128.
thank you for help
 
Old 09-13-2010, 07:47 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You might also have a look at the -N option.

Quote:
-N number-of-inodes
Overrides the default calculation of the number of inodes that
should be reserved for the filesystem (which is based on the
number of blocks and the bytes-per-inode ratio). This allows
the user to specify the number of desired inodes directly.
Hope this helps.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to calculate the bytes-per-inodes value? z@ki Red Hat 3 02-24-2010 03:17 PM
Inodes? ddzc Linux - Software 1 05-24-2008 10:18 PM
Inodes ??? Texas_student Linux - Software 2 03-22-2006 11:16 PM
TX bytes vs. httpd bytes ovrload Linux - Networking 3 10-12-2005 05:19 PM
What is inodes? ionian2k Linux - Newbie 1 12-15-2002 11:29 AM


All times are GMT -5. The time now is 08:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration