Operating System - HP-UX
1837047 Members
3112 Online
110111 Solutions
New Discussion

df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

 
Anthony deRito
Respected Contributor

df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

df -g /dev/vg06/lvol3
8192 file system block size

fstyp -v /dev/vg06/lvol3
f_bsize: 1024

Which is right????

Tony
11 REPLIES 11
Joel Shank
Valued Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Hi Tony

Good question. When I do this, I get the same value for the blksize, which seems right, since both commands get the blksize from the same place (the superblock).

Does this happen on all devices you query, or is this the only one?

JLS
Tim Malnati
Honored Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

I would suggest that 1024 is probably correct if you have VxFS file systems. My guess is that the -g option of df needs to be upgraded (I guess you prove that somebody uses it).
Anthony deRito
Respected Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Thanks Joel. All do. I am running all VxFS filesystems not HFS. How about you?

Tony
James R. Ferguson
Acclaimed Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Tony:

The "descrepency" between your observation and Joel's is because Joel looked at an HFS filesystem and you looked at a vxfs (JFS) one. Compare your /stand filesystem with 'df' and with 'fstyp' to your /usr filesytem, for instance.

From document #1100330242
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

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Tony:

OOPS! I misread my own output. I DO see the same (on 10.20) problem that you do! What release is everyone on when they try this?

...JRF...

Anthony deRito
Respected Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Yes, df -g AND fstyp -v on the same filesystem reports two different answers. df -g reports 8192 block size and fstyp -v reports 1024 block size (f_bsize) on the same filesystem. This is true for all of my VxFS filesystems.

James R. Ferguson
Acclaimed Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Tony:

I agree, sorry for the confusion.

Are you running 10.20 or 11.0 ? [I'm on 10.20].

...JRF...
Anthony deRito
Respected Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

I am running 10.20.
Eddie Warren
Valued Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Hi Tony,

I had the same results as you on the 10.20 O/S.
I would trust the 8192 block size on your "fstyp -v /dev/vg00/lvol3". I tried on on one of my HPUX 11.0 systems and they both reported 8192 file system block size. Both systems were using "vxfs". It looks like they fixed a problem with "df -g" on 11.0.

Take Care,

Eddie
Anthony deRito
Respected Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Thanks for all your suggestions however, I am still not convinced which tool is reporting the correct figure. I logged a call with HP. First line passed on to back line who should be calling me back soon. He told me that default for VxFS is 1024 bytes. The funny thing is that even GlancePlus shows it as 8K!!
If you go into the filesystem detail window, the blocksize is printed on the top right of the screen just below the FS type field.

Just too many conflicting things going on here!

Tony
Anthony deRito
Respected Contributor

Re: df -g ... or.... fstyp -v..... which is right filesystem blocksize ???

Here is what HP support came back with:

"Anthony, the 'df -g' command reports on 'fragment size'. The 'fragment size'
status actually corresponds to the current 'block size'. Furthermore, what 'df' reports as 'block size' is actually the
filesystem's 'maximum possible block size'.
Regards, George, HP"

My take on this is that I still am not sure how to determine my filesystem block size!! I guess I need to consider/determine the source of the response and thus its accuracy.

Any comments?

Tony