1844062 Members
3116 Online
110227 Solutions
New Discussion

inode size

 
Chris Burkart_1
Occasional Contributor

inode size

How do I view the idnode size on an hfs file system? I want to verify that it's 1024 bytes.
We need to store many thousand files that are only about 1024 bytes in size.
13 REPLIES 13
Bill McNAMARA_1
Honored Contributor

Re: inode size

try
bdf -i
for a start
I'll try to find the exact command..

Later,
Bill
It works for me (tm)
Bill McNAMARA_1
Honored Contributor

Re: inode size

try refering to this link and fstyp -v lvol

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x59d828e43106d6118ff40090279cd0f9,00.html
It works for me (tm)
Sandip Ghosh
Honored Contributor

Re: inode size

You can look through df -i
for details have a look at 'man df'.


Sandip
Good Luck!!!
harry d brown jr
Honored Contributor

Re: inode size


OS is ?

idnode is ?

live free or die
harry
Live Free or Die
Sandip Ghosh
Honored Contributor

Re: inode size

Your best bet will be df -g

Sandip
Good Luck!!!
MANOJ SRIVASTAVA
Honored Contributor

Re: inode size

There is also another way


mkfs -m /dev/vg02/lvol4 will give the details of the fielsystem in terms of inodes and inode size ie the defaults which were used to create the fielsystem



Manoj Srivastava
Chris Burkart_1
Occasional Contributor

Re: inode size

OK, now I'm really confused. Is block size the same as inode size? O/S is 10.20.
A. Clay Stephenson
Acclaimed Contributor

Re: inode size


I think you are asking the wrong question but
here goes:

Create this small c program and compile and run it on your box; it will work with even the bundled C compiler.

inodesz.c
----------------------------------
#include

int main()
{
printf("Size = %d bytes\n",sizeof(struct inode));
return(0);
}

compile it like this:
cc inodesz.c -o inodesz

Execute inodesz.

What you are probably needing to know is the fragment size. You can use dumpfs to display that value but it is typically 1024 bytes.

Man newfs_hfs for details.

By the way, vxfs is probably your better answer
because it is extent-based and will generally make better use of the space for small files AND performance will be better.

If it ain't broke, I can fix that.
Sajid_1
Honored Contributor

Re: inode size

hi,

this will be a good command for you:
# dumpfs file_system_name

HTH
learn unix ..
Wodisch_1
Honored Contributor

Re: inode size

Hi,

I can only guess that your question is really about "fragment size", as your files then would only occupy a single fragment, each, and hence 8 of them would fit into a single block. Check the output of "tunefs -v" on your file-system's device file for this piece of information (fields "bsize" and "fsize).
With "idnode" you mean "i-node", don't you? And each one is 256 bytes (as Clay's program should tell you), IIRC. So better check with "bdf -i" that you have that many inodes free, regardless of the size of the individual i-node...
A further guess is that you will have to re-create (mkfs) your filesystem with the option "nbpi" set to 1024!

Just my $0.02,
Wodisch
Frank Slootweg
Honored Contributor

Re: inode size

I think you are referring to the "number_of_bytes_per_inode" (see the "nbpi" option in the mkfs_hfs(1M) manual page or the "-i" option in the newfs_hfs(1M) manual page).

As far as I know, you can not directly get that via a command, but you can get it indirectly:

bdf -i /dev/vg??/lvol?

This shows "kbytes", "iused" and "ifree". Now calculate kbytes/(iused + ifree) and you have nbpi, i.e.:

Filesystem kbytes used avail %used iused ifree %iuse Mounted on
/dev/vg00/lvol3 83733 41184 34175 55% 3827 9613 28% /

83733/(3827+9613) -> 6.23 i.e. 6KB/inode

"df -t" gives similar information: "total blocks" (divide by two to get KB) and "total i-nodes".
Trond Haugen
Honored Contributor

Re: inode size

And I think you concern should be how many inodes you HFS has! For a HFS the number of inodes are fixed, and set a when the filesystem is created.
So if you have a 1Gb filesystem it would need approximately 1048576 inodes. 'newfs -i 1048576 /dev/dsk/HFSdisk'.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Trond Haugen
Honored Contributor

Re: inode size

Oops. Don't belive all I write.
the '-i' option is number_of_bytes_per_inode so the command should be 'newfs -i 1024 /dev/dsk/HFSdisk.

Sorry,
Trond
Regards,
Trond Haugen
LinkedIn