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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OS block size 1

Status
Not open for further replies.

lweng

Technical User
May 18, 2001
113
US
What's the default OS block size on UNIX? how to check it out? Thanks.
 
If you are asking so you can put a Oracle Database On it, put the largest offered (8k last I looked) and use a long read multiplier to get to 64k. The one thing you can't give for your heart's desire is your heart. - Lois McMaster Bujold
 
Which command is used to check OS block size and how to set OS block size on unix? Thanks.
 
You can check a 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

also note that blocks in fsck are logical, except frags and used blocks i.e:
# umount /data
# fsck /data
** /dev/dsk/c0t1d0s0
** Last Mounted on /data
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 9 used, 1018373 free (21 frags, 127294 blocks, 0.0% fragmentation)

127294*8192=1042792448+(21+9)*1024=1042823168 bytes
21+9 is frag + used (used and frag size is 1024 bytes) as "df -g" shows for frag size.

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.

Hope this helps.

Regards,

Carlos Almeida,


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top