Operating System - HP-UX
1821081 Members
2538 Online
109631 Solutions
New Discussion юеВ

Blocksize on existing vxfs filesystem

 
SOLVED
Go to solution
Kevin O'Donovan
Regular Advisor

Blocksize on existing vxfs filesystem

Hi,

I'm trying to find the blocksize of a filesystem I'm going to put a quota on (edquota looks for blocks rather than kbytes). I've come across a few commands to find this info:

# df -g /homes
/homes (/dev/vg05/lvol1 ) :
8192 file system block size 1024 fragment size
11780096 total blocks 67281 total free blocks
67281 allocated free blocks 135408 total i-nodes
20931 total free i-nodes 20931 allocated free i-nodes
1074069505 file system id vxfs file system type
0 flags 255 file system name length
/homes file system specific string
#

# fstyp -v /dev/vg05/lvol1
vxfs
version: 3
f_bsize: 8192
f_frsize: 1024
f_blocks: 11780096
f_bfree: 66857
f_bavail: 66857
f_files: 135408
f_ffree: 1073792296
f_favail: 1073792296
f_fsid: 1074069505
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 11780096
#

# mkfs -F vxfs -m /dev/vg05/rlvol1
mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=3,inosize=256,logsize=1024,nolargefiles /dev/vg05/rlvol1 11780096
#

The top 2 tell me that the blocksize is 8K, but the last one is talking about 1K. Anyone know whats going on with these, and which is correct?

thanks in advance, Kevin.
6 REPLIES 6

Re: Blocksize on existing vxfs filesystem

I *can't* tell you whats going on!

But I can tell you that the block size on your file system is 1024 - This is reported as the gragment size on df and fstyp

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Marcin Wicinski
Trusted Contributor

Re: Blocksize on existing vxfs filesystem

Hi,
df -g reports all information contained in statvfs structure:
f_bsize; /* preferred file system block size */
f_frsize; /* fundamental file system block size */

Later,
Marcin Wicinski
Roger Baptiste
Honored Contributor
Solution

Re: Blocksize on existing vxfs filesystem

Kevin,

I ran into this same issue few months back.
Even though df
***
# df -g /homes
8192 file system block size
1024 fragment size
version: 3
f_bsize: 8192
f_frsize: 1024
**

The frsize (or fragment size) is infact the actuall block size of the filesystem and it is the default Block size used by the newfs/mkfs commands. So, if you need a higher block size (as is the norm especially on oracle db), use the -b option with the newfs command to specify the new block size. Pls note , you cannot change the block size of existing FS.

HTH
raj
Take it easy.
Sanjay_6
Honored Contributor

Re: Blocksize on existing vxfs filesystem

Hi Kevin,

The command " fstyp -v /dev/vg05/lvol1" is reporting the correct block size "f_bsize: 8192".

Take a look at the thread below,

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=754ce4000419e32a95/screen=ckiDisplayDocument?docId=200000054230626

Hope this helps.

Regds

Re: Blocksize on existing vxfs filesystem

Sorry Sanjay, I just checked that thread, and if you look at the last few lines, they spell out the truth:
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)


So f_bsize is the maximum possible block size you can have on a vxfs file system, which is born out by the following example:

# newfs -F vxfs -b 16384 /dev/vg00/rlvol25
vxfs mkfs: bsize must be a power of 2 >= 1024 and <= 8192

And f_frsize is the actual block size for vxfs file systems as in:

# newfs -F vxfs -b 4096 /dev/vg00/rlvol25
version 3 layout
106496 sectors, 26624 blocks of size 4096, log size 512 blocks
unlimited inodes, 26624 data blocks, 26080 free data blocks
1 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 26624 data blocks
first allocation unit starts at block 0
overhead per allocation unit is 0 blocks
# fstyp -v /dev/vg00/lvol25
vxfs
version: 3
f_bsize: 8192
f_frsize: 4096
f_blocks: 26624
f_bfree: 26075
f_bavail: 25668
f_files: 6544
f_ffree: 6512
f_favail: 6512
f_fsid: 1073741841
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 26624

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Kevin O'Donovan
Regular Advisor

Re: Blocksize on existing vxfs filesystem

Thanks lots for the replies!

Bit of a confusing one so a quick summary, it means different things for HFS & VXFS filesystems. The document Sanjay points to (thanks) doesn't clarify it very clearly until the end where it has:
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)

So Duncan, Marcin and particular Rajman were right on the button. thanks!! Kevin.