Solaris disk information


I have few questions about understanding the disk geometry in a Solaris machine.

1. How to find the size of a single cylinder in Solaris? Is there any straight-forward command?

2. How to convert the number of sector count displayed in prtvtoc output into Megabytes, so that i can know the size of a particular slice?  

3. I believe that in solaris, by default, data blocks are created with 8 KB (8192 bytes) in size. Is it possible create filesystem more than or less than this size?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I have taken the following from my system. I have 20 GB hdd:

# prtvtoc /dev/rdsk/c0t0d0s0
* /dev/rdsk/c0t0d0s0 partition map
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*      16 tracks/cylinder
*    1008 sectors/cylinder
*   38792 cylinders
*   38790 accessible cylinders

size = cylinders * tracks * sectors * 512 = size in bytes

size = 38792 * 16 * 63 * 512 = 20,020,396,032 bytes

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
For the 2nd question, each sector is 512 bytes or 0.5 k

so 1 MB = 1024 * 2 = 2048 sectors
Brian UtterbackPrinciple Software EngineerCommented:
As a general rule, you should not need to pay attention to cylinders and sectors and cylinder groups and
things like that. Cylinders can be important when you actually lay out the partition table, but that is really
the only time.

On x86 you can specify 4096, but for Sparc the only option is 8192. However, just like cylinders and sectors,
you should not be concerned with that. The actual amount transferred on a single request is almost certainly
larger than a single block and depends on the hardware as to the actual value.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

rdashokrajAuthor Commented:
Thanks for your inputs. But am still not clear about my 3rd question. Please clarify, is it possible to create filesystem more than the default block size of 8KB? To put it more specific way, can I create a filesystem with 1 MB data block size? So that every 1 MB datablock will have 1 inode to point it.

I believe, we will get these kind of requirements while creating filesystem for Oracle database. But not very sure.
This is an option with the newfs command:

 -b bsize
rdashokrajAuthor Commented:
All right! Your answer confirms that its possible to create filesystem more than the default datablock size. Thanks for clarifying me.
Brian UtterbackPrinciple Software EngineerCommented:
I am not sure what you are asking. You can specify the nbpi parameter, which determines the number of inodes allocated in a filesystem as a function of the filesystem size. Use the -i option to newfs for this.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.