1829161 Members
9727 Online
109986 Solutions
New Discussion

file system blocksize

 
Ivan Thoelen
New Member

file system blocksize

How can I check the file system blocksize for a vxfs filesystem?

df -g show me always 8192 file-system blocksize.
But total blocks is always 1/1000 of the total amount of space for that filesystem.
So I would say 1k blocks.

7 REPLIES 7
MARTINACHE
Respected Contributor

Re: file system blocksize

Hi,

fstyp -v /dev/vgXX/lvXXXX

look at f_bsize value

Regards,

Patrice.
Patrice MARTINACHE
Vincenzo Restuccia
Honored Contributor

Re: file system blocksize

fstyp -v /dev/vgXX/lvolx|grep -i f_bsize

Stefan Farrelly
Honored Contributor

Re: file system blocksize

This has been argued over before. There are a lot of different definitions on what block size means;

Basically, HP-UX only talks to disks at 512bytes as a block size via the drivers. HFS uses 512bytes.

JFS uses DEV_BSIZE (declared in /usr/include/sys/param.h) as 1k. However, at a lower level this is still talking to the disk as 512bytes as thats what the HP-UX drivers use. fstyp -v and newfs use a block size parameter which defaults to 8 * DEV_BSIZE (so 8k), but again, at a lower level it uses DEV_BSIZE, so 1k, and even lower down to the HP-UX driver only talks to the disks at 512bytes. So take your pick as to the block size.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Frank Li
Trusted Contributor

Re: file system blocksize

I thinks it should be the "f_frsize" . This value can be changed by the command "newfs_vxfs" with the -b option .

And I am also confused with "f_bsize" with "f_frsize" , does "f_frsize" mean fragment size ? but the command " newfs -F vxfs -b 2048 /dev/vg00/lvol# " just change the f_frsize value ?


Frank.
Hi Friend
Frank Li
Trusted Contributor

Re: file system blocksize


How can we change the f_bsize ? Or it is determinted my the system ? with the -b option of newfs_vxfs command you can only change the f_frsize , that is the fragment size .

Frank.
Hi Friend
Patrick Wallek
Honored Contributor

Re: file system blocksize

From TKB document #1100330242

PROBLEM

How can I determine the current block size for the vxfs and hfs file systems?

CONFIGURATION

Operating System - HP-UX
Subsystem - System Administration

RESOLUTION

To determine the current block size for the vxfs file system:

fstyp -v /dev/vg00/lvol#

For example:

# fstyp -v /dev/vg00/lvol1

f_bsize: 8192

Note: The f_bsize parameter reports the block size for the vxfs file system.

To determine the current block size for the hfs file system:

tunefs -v /dev/vg00/rlvol# | grep bsize

For example:

# tunefs -v /dev/vg00/rlvol4 | grep bsize

sbsize 2048 cgsize 2048 cgoffset 24 cgmask 0xfffffff8
bsize 8192 bshift 13 bmask 0xffffe000

Here is an example of how HFS and VxFS actually interpret these fields:

Field HFS Value for VxFS
---- --- --------------
f_bsize block size (8K) largest possible block size (8K)
f_frsize fragment size (1K) actual block size (usually 1K)

Re: file system blocksize


#mkfs -F vxfs -m /dev/vg00/lvol4
will give this output
mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=4,inosize=256,logsize=1024,nolargefiles /dev/vg00/lvol4 1048576
here bsize value is the block size in bytes.
Strive for perfection