Wiki-UX / File Systems / VxFS Block Size
Jump to: navigation, search

VxFS Block Size


This article presents information about VxFS the block zize available on different sources in a place. Likewise, how to determinate the current block size of a JFS (VxFS) file system is also discused.

HP-UX 11i Operating Environment by default uses VxFS (JFS) file system, except for /stand on HP 9000 systems. Ocasionally, setting non default block size is required to support very large file systems, 2 TB or more according the the VxFS release or or to provided some performance tuning when the average size of the files to be stored is well know up front.



"The block size (bsize) for files on the file system [...] represents the smallest amount of disk space allocated to a file. The block size must be a power of 2 selected from the range 1024 bytes to 8192 bytes. The default is 1024 bytes for file systems smaller than two terabytes. For file systems larger than two terabytes, the maximum file system size is dependent on the block size.
A block size of 1 KB allows a maximum file system size of up to 32 terabytes, a block size of 2 KB allows a maximum file system size of up to 64 terabytes, a block size of 4 KB allows a maximum file system size of up to 128 terabytes, and a block size of 8 KB allows for a file system up to 256 terabytes.
These maximum sizes are for disk layout Version 6. The actual maximum file system sizes are slightly less than the above values. The exact values can be found in the Veritas File System Administrator's Guide. If the block size is not specified, the block size defaults to the appropriate value when a file system is created."

Create a new file system with non default block size

# lvcreate -L 512 /dev/vg00
Logical volume "/dev/vg00/lvol9" has been successfully created with
character device "/dev/vg00/rlvol9".
Logical volume "/dev/vg00/lvol9" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# mkfs -F vxfs -o bsize=2048 /dev/vg00/rlvol9
    version 7 layout
    524288 sectors, 262144 blocks of size 2048, log size 8192 blocks
    largefiles supported

Check a file system block size

# mkfs -F vxfs -m /dev/vg00/rlvol9
mkfs -F vxfs -o ninode=unlimited,bsize=2048,version=7,inosize=256,logsize=8192,largefiles /dev/vg00/rlvol9 524288
# fstyp -v /dev/vg00/rlvol9
version: 7
f_bsize: 8192                      <-- VX_MAXBSIZE == 8192 
f_frsize: 2048                     <-- bsize for this file system
f_blocks: 262144
f_bfree: 253355
f_bavail: 245438
f_files: 63368
f_ffree: 63336
f_favail: 63336
f_fsid: 1073741833
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 9
f_size: 262144



This page was last modified on 17 July 2010, at 02:04. This page has been accessed 4,497 times.