Query related to Inodes in Solaris

Hi friends,
1.From the information I gathered, an inode is an object which has a number associated with it... and when a slice is partitioned, inodes with their numbers are created.
When a file is created, an inode number is assigned to it. This could be viewed through ls -i <dir/file> command. Each inode has 2 pointers, 1 pointer pointing to block containing properties of a file/dir and other pointer points to data blocks for the file.

2.Now, please clarify my doubts:

  1.What is the basic size of an inode in Solaris ? \(for eg, in linux its 128 bytes\).  So, if it is 128 bytes, does it mean that the size of a file can only be 128 bytes..?. 
  2.What is the need for increasing the number of bytes per inode by means of
       newfs -i &lt;raw device&gt; command?

thank u.

There are many resources to explain inodes in detail. Let me try to give you a basic understanding.

First, inodes are on disk descriptions of the storage allocation of a file in a filesystem. It does not contain the filename used to access the storage. It does contain the number of path names that refer to that storage.

Second, when a file is opened, a vnode is created that contains information from the inode. The OS only uses the vnode during file access.

Third, a file is located via it's directory entry. A directory entry basically consists of a file name and inode number. So when you open a file, the system searches for the directory containing the file entry. It then uses the inode entry to create a vnode.

Fourth... This size of the inode is not really useful. It does not determine file size. It only contains information that describes the information necessary to manage the file.

Fifth... the -i option of newfs refers to the density of inodes. That is.. how many inodes will be created. It is actually a mkfs option.

try this:

[22.]System Administration Guide: Devices and File Systems - Sun Microsystems](http://docs.sun.com/app/docs/doc/817-5093/fsfilesysappx-94408?l=en_US&a=view)

hi jp2542a,
Thanks for the response,
Actually i got confused with the term "density" of inodes.

Is it the number of inodes in a filesystem or the number of bytes of an individual inode?

thanks .

Density is the number of inodes that will be created in a filesystem as a ratio of inodes per bytes in the filesystem. If the fs will have a lot of small files, then you want lots of inodes and hence high density (low -i value). If you have a few large files, then you want low density (high -i value). Look at the link I gave you near the bottom.

thank u jp