LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 03: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, 04: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, 04: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, 05: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, 06: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, 06:47 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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



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 02:17 PM
Inodes? ddzc Linux - Software 1 05-24-2008 09:18 PM
Inodes ??? Texas_student Linux - Software 2 03-22-2006 10:16 PM
TX bytes vs. httpd bytes ovrload Linux - Networking 3 10-12-2005 04:19 PM
What is inodes? ionian2k Linux - Newbie 1 12-15-2002 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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