Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find the Block size of my operating system.

Status
Not open for further replies.

Jonathan777

Technical User
Aug 23, 2001
26
0
0
US
Need help in finding out my block size for an solaris 2.6 system.
 
You can check a ufs filesystem logical block size with:
"df -g", e.g for a "/data" filesystem with aprox 1GB:
# df -g /data
/data (/dev/dsk/c0t1d0s0 ):8192 block size 1024 frag size
2036764 total blocks 2036746 free blocks
2016380 available 251008 total files
251004 free files
8388616 filesys id ufs fstype 0x00000004 flag
255 filename length

logical block size of /data is 8192 bytes or 8k, note that total blocks in df are in physical blocks, (512 bytes size):

2036704/2 = 1018352*1024 = 1042823168 bytes

You can change logical block size for a ufs filesystem in Solaris with "-b" flag in newfs command (when you create a new filesystem), however note that Solaris sun4u architecture does not support the 4096 block size, while others like Veritas vxfs support many different block sizes.

Hope this helps.

Regards,

Carlos Almeida,
 
Jonathan:

Under Solaris, try the format command and then look at the partition info:

partition> print
Current partition table (original):
Total disk cylinders available: 845 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 3 - 33 122.06MB (31/0/0) 249984
1 swap wu 34 - 160 500.06MB (127/0/0) 1024128
2 backup wm 0 - 795 3.06GB (796/0/0) 6418944
3 unassigned wm 0 0 (0/0/0) 0
4 var wm 161 - 287 500.06MB (127/0/0) 1024128
5 unassigned wm 288 - 541 1000.12MB (254/0/0) 2048256
6 usr wm 542 - 795 1000.12MB (254/0/0) 2048256
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 3.94MB (1/0/0) 8064
9 alternates wu 1 - 2 7.88MB (2/0/0) 16128

with the size and number of blocks you should be able to do the math.

Also, check out the solaris prtvtoc, print volume command. From the man page:

EXAMPLES
The command line entry and system response shown below are
for a 424-megabyte hard disk:

example# prtvtoc /dev/rdsk/c0t3d0s2
* /dev/rdsk/c0t3d0s2 partition map
*
* Dimension:
* 512 bytes/sector
* 80 sectors/track
* 9 tracks/cylinder
* 720 sectors/cylinder
* 2500 cylinders
* 1151 accessible cylinders

You must be root to use either prtvtoc or format.


Regards,


Ed
Schaefer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top