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?
omarfaridConnect With a Mentor Commented:
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
omarfaridConnect With a Mentor Commented:
For the 2nd question, each sector is 512 bytes or 0.5 k

so 1 MB = 1024 * 2 = 2048 sectors
Brian UtterbackConnect With a Mentor Principle 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.
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
omarfaridConnect With a Mentor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.