Operating System - HP-UX
1832974 Members
2517 Online
110048 Solutions
New Discussion

How to find the Block Size.

 
Gulam Mohiuddin_1
Occasional Contributor

How to find the Block Size.

How to find the O/S Block size for different file Systems on HP-UX 11.00
64-Bits version.

What is the default OS Block size. Can we change it.

Can we have different Block sizes for different filesystem on the same machine.

Thanks,
2 REPLIES 2
Paul Hite_2
Frequent Advisor

Re: How to find the Block Size.

Well, you are confusing several different things.

First of all, there is DEV_BSIZE which is defined in /usr/include/sys/param.h.
The is the unit of i/o for transfers to/from block devices. The comment in
param.h that it "cannot be changed easily" is a bit misleading. It cannot be
changed at all without the source code to HP-UX.

Next, filesystems have a blocksize and you can specify it when you do the
newfs(1M). This blocksize must be a power of 2 multiple of DEV_BSIZE. The
default is 8192 for hfs filesystems and 1024 for vxfs filesystems. The stat(2)
and fstat(2) system calls can return the filesystem's blocksize. For hfs, you
can use the program dumpfs(1M) and for vxfs you can use the program getext(1M)
to see the blocksize. In either case you can override the default blocksize at
newfs time by using a parameter, but I don't know anyway to change the defaults
built in to newfs.

To confuse things a bit more, some commands have various defaults for
blocksizes. For example, du(1) will default to a blocksize of 512. So you
always want to check the manpage.
Randy Mather
Frequent Advisor

Re: How to find the Block Size.

fsadm command check it out.