Operating System - HP-UX
1850094 Members
2799 Online
104050 Solutions
New Discussion

Re: File System Block Size

 
Sundar_7
Honored Contributor

File System Block Size


Why is that df -g always reports 8KB as the block size for both the VXFS and HFS File systems. fstyp reports correctly.

root@:>df -g / | grep -i "file system block size "
8192 file system block size 1024 fragment size
root@:>df -g /stand | grep -i "file system block size "
8192 file system block size 1024 fragment size
root@:>fstyp -v /dev/vg00/rlvol1 | grep -i bsize
f_bsize: 8192
root@:>fstyp -v /dev/vg00/rlvol3 | grep -i bsize
f_bsize: 1024
root@:
Learn What to do ,How to do and more importantly When to do ?
7 REPLIES 7
eran maor
Honored Contributor

Re: File System Block Size

Hi

this is a known issue , use the command fstyp
to get the info .

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'
love computers
T G Manikandan
Honored Contributor

Re: File System Block Size

#df -g
displays the fragment size and the maximum possible block size.

So your df -g has given a maximum possible block size as 8192 kbytes and the fragment size 1024 Kbytes.

So just use df -g to find out the fragment size and

to find out the block size for vxfs
#fstyp -v /dev/vgxx/lvolX
f_bsize-->current block size
f_frsize--->default block size.

for hfs
#tunefs -v /dev/vgxx/rlvolX | grep bsize

Thanks
Shahul
Esteemed Contributor

Re: File System Block Size


HI

Why are you getting in to issues, that too known as per Eran.

#mkfs -m will give the exact block size of a filesystem.

Best of luck
Shahul
Steven E. Protter
Exalted Contributor

Re: File System Block Size

There are some valid reasons for using larger block sizes on filesystems.

Oracle performance can be substantially enhanced by choosing an appropriate block size.

mkfs -m /dev/vg00/roracle2
mkfs -F vxfs -o ninode=unlimited,bsize=4096,version=4,inosize=256,logsize=512,la
rgefiles /dev/vg00/roracle2 30720000

[4264#] fstyp -v /dev/vg00/roracle2
vxfs
version: 4
f_bsize: 8192
f_frsize: 4096
f_blocks: 7680000
f_bfree: 4566335
f_bavail: 4494987
f_files: 1141856
f_ffree: 1141568
f_favail: 1141568
f_fsid: 1073741844
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 7
f_size: 7680000


That's kind of funny, on first glance it looks like things aren't consistent between the two commands.

I've heard of people going to 32 or 64 or 128 depending on how the application reads data.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Duncan Wright
New Member

Re: File System Block Size

I'm resurrecting this on, because I need to know why fstyp -v /mountpoint reports f_bsize=8192, while the blocksize specified creating the filesystem was 1024.

If anyone could help I would really appreciate it.
Tom Danzig
Honored Contributor

Re: File System Block Size

The "f_bsize" actually refers to the larges supported block size for the file system type. "f_frsize" refers to the actual block size of the file system.
Sundar_7
Honored Contributor

Re: File System Block Size

"The "f_bsize" actually refers to the
larges supported block size for the file system type. "f_frsize" refers to the actual block size of the file system."

I dont believe this is the case. f_bsize is the actual block size of the file system. f_frsize is the size of the fragments.
Learn What to do ,How to do and more importantly When to do ?