fs(4VXFS) (VXFS) fs(4VXFS)
NAME
fs (vxfs) - format of vxfs file system volume
SYNOPSIS
#include <sys/types.h>
#include <sys/param.h>
#include <sys/fs/vx_fs.h>
DESCRIPTION
The vxfs super-block always begins at byte offset 1024 from
the start of the file system. The super-block location is
fixed so utilities know where to look for it.
The super-block contains the following fundamental sizes and
offsets:
fs_magic
The magic number for the file system (VX_MAGIC). This
number identifies the file system as being a vxfs
FSType.
fs_version
The version number of the file system layout
(VX_VERSION). This is currently 1 for the vxfs Version 1
disk layout and 2 for the Version 2 layout.
fs_ctime
The creation date of the file system. The time system
call supplies the time.
fs_ectime
This field is a placeholder in instances when the
creation date for a file system is expanded for more
precision. It currently is zero.
fs_logstart
The block address of the first Log Area block. It
currently is two.
fs_logend
The block address of the last Log Area block. The Log
Area size in blocks may be specified as part of mkfs.
If not specified, a default of 512 blocks is used. A
minimum size of 32 blocks is enforced. For smaller file
systems, the default is reduced to avoid wasting space.
Copyright 1994 Novell, Inc. Page 1
fs(4VXFS) (VXFS) fs(4VXFS)
fs_bsize
The block size of the file system. The current choices
are 1024, 2048, 4096, and 8192 bytes.
fs_size
The number of blocks in the file system, expressed as
the number of blocks of size fs_bsize. The fs_size
field is a signed 32 bit number. The maximum number of
blocks in a vxfs file system is limited to 31 bits.
fs_dsize
The number of data blocks in the file system. A data
block is a block which may be allocated to a file in the
file system.
fs_ninode
The number of inodes in the file system allocation
units. For Version 2 layout file systems, this field is
0.
For Version 1 layout file systems:
The fs_ninode field contains the number of inodes
in all of the file system allocation units. This
field is the limit on the number of inodes in the
file system.
The fs_ninode field is an unsigned 32-bit number.
The number of inodes may be specified as part of mkfs.
If not specified, the default will be fs_dsize divided
by 4.
fs_nau
The number of allocation units in the file system. The
number of allocation units may be specified as part of
mkfs.
fs_defiextsize
The default size for indirect data extents, expressed in
blocks. This field is currently set to 64 by default.
fs_oilbsize
The size of an old inode list block, expressed in bytes.
This size may be specified as part of mkfs. If not
specified, a default of either 2K or fs_bsize (whichever
Copyright 1994 Novell, Inc. Page 2
fs(4VXFS) (VXFS) fs(4VXFS)
is larger) is used. For the Version 2 layout, this is
initialized to 0 and not used.
fs_immedlen
The size, in bytes, of the immediate data area in each
inode. This value is 96 for the vxfs file system.
fs_ndaddr
The number of direct extents supported by the VX_EXT4
mapping type (see the section describing inode list).
This value is 10 for the vxfs file system.
The preceding fields define the size and makeup of the file
system. To reduce the calculations required in utilities, a
number of values are derived from the fundamental values and
placed in the super-block.
The super-block contains the following derived offsets:
fs_aufirst
The address, in blocks, of the first allocation unit.
There can be a gap between the end of the intent log and
the first allocation unit. This gap could be used to
align the first allocation unit on a desired boundary.
fs_emap
The offset in blocks of the free extent map (emap) from
the start of an allocation unit.
fs_imap
The offset in blocks of the free inode map (imap) from
the start of an allocation unit.
fs_iextop
The offset in blocks of the extended inode operation map
from the start of an allocation unit. For the Version 2
layout, this is initialized to 0 and not used.
fs_istart
The offset in blocks of the inode list (ilist) from the
start of an allocation unit. For the Version 2 layout,
this is initialized to 0 and not used.
fs_bstart
The offset in blocks of the first data block from the
start of an allocation unit. An allocation unit header
Copyright 1994 Novell, Inc. Page 3
fs(4VXFS) (VXFS) fs(4VXFS)
may contain padding to align the first data block.
fs_femap
The offset in blocks of the first free extent map (emap)
from the start of the file system.
fs_fimap
The offset in blocks of the first free inode map (imap)
from the start of the file system.
fs_fiextop
The offset in blocks of the first extended inode
operation map from the start of the file system. For
the Version 2 layout, this is initialized to 0 and not
used.
fs_fistart
The offset in blocks of the first ilist from the start
of the file system. For the Version 2 layout, this is
initialized to 0 and not used.
fs_fbstart
The offset in blocks of the first data block from the
start of the file system.
fs_nindir
The number of entries in an indirect address extent. An
indirect address extent is currently 8192 bytes in
length, making the current value for fs_nindir 2048.
fs_aulen
The length of an allocation unit in blocks.
fs_auimlen
The length of a free inode map in blocks. For the
Version 2 layout, this is initialized to 0 and not used.
fs_auemlen
The length of a free extent map in blocks.
fs_auilen
The length, in blocks, of the inode list for this
allocation unit. For the Version 2 layout, this is
initialized to 0 and not used.
Copyright 1994 Novell, Inc. Page 4
fs(4VXFS) (VXFS) fs(4VXFS)
fs_aupad
The length, in blocks, of the allocation unit alignment
padding.
fs_aublocks
The number of data blocks in an allocation unit.
fs_maxtier
The log base 2 of fs_aublocks.
fs_inopb
The number of inode entries per fs_bsize block in the
inode list. The vxfs inode is currently 256 bytes long.
fs_inopau
The number of inodes in an allocation unit.
fs_inopilb
The number of inode entries per fs_oilbsize block in the
inode list. For the Version 2 layout, this field is
obsolete.
fs_ndiripau
Expected number of directory inodes per allocation unit.
For the Version 2 layout, this is initialized to 0 and
not used. For the Version 1 layout, this field is
unused, but mkfs initializes it to about one ninth of
the total number of inodes in the allocation unit.
fs_iaddrlen
The size, in blocks, of an indirect address block. An
indirect address block is 8K bytes. This field will be
set to (8K / fs_bsize).
fs_bshift
The log base 2 of fs_bsize. Used to convert a byte
offset into a block offset.
fs_inoshift
The log base 2 of fs_inopb. Used to convert an inode
number into a block offset in the inode list.
fs_bmask
A mask value such that (byte_offset + fs_bmask) rounds
the offset to the nearest smaller block boundary.
Copyright 1994 Novell, Inc. Page 5
fs(4VXFS) (VXFS) fs(4VXFS)
fs_boffmask
A mask value such that (byte_offset + fs_boffmask)
yields the offset from the start of the nearest smaller
block boundary.
fs_inomask
A mask value such that (inode_number + fs_inomask)
yields the offset from the start of the containing inode
list block of the corresponding inode list entry. For
the Version 2 layout, this field is obsolete.
fs_checksum
A simple checksum of the above fields. A macro,
VX_FSCHECKSUM is provided to verify or calculate the
checksum.
The above fields are initialized when the file system is
created and do not change unless the file system is resized.
These fields are replicated in each allocation unit header.
There are additional fields which are considered to be
dynamic:
fs_free
The current number of free data blocks.
fs_ifree
The current number of free inodes. For the Version 2
layout, a separate free inode count is kept for each
fileset; this is initialized to 0 and is not used.
fs_efree
An array of the current number of free extents of each
extent size in the file system.
fs_flags
The following flags are recognized:
VX_FULLFSCK
Set when a file system requires a full structural
check to recover from an error. If this flag is
set, a full check will be performed after the
replay recovery is finished.
Copyright 1994 Novell, Inc. Page 6
fs(4VXFS) (VXFS) fs(4VXFS)
VX_NOLOG
Set when the file system was mounted with the
VX_MS_NOLOG option. If this flag is set, then no
log replay recovery will be performed.
VX_LOGBAD
Set when an I/O error has invalidated the log. If
this flag is set, then no log replay recovery will
be performed.
VX_LOGRESET
Set when the log ID runs over VX_MAXLOGID ( 2^30
). The log ID will be reset at the next
appropriate opportunity (such as a mount or 60-
second sync).
VX_RESIZE
Set when a file system resizing is in progress.
If an fsck sees this flag, it will have to perform
resize recovery.
VX_UPGRADING
Set when a file system upgrade is in progress. If
an fsck sees this flag, it will have to perform
upgrade recovery.
fs_mod
Set whenever a mounted file system is modified. It is
used to indicate if the super-block needs to be written
when a sync operation is performed.
fs_clean
Set to VX_DIRTY when a file system is mounted for
read/write access. Set to VX_CLEAN upon umount or
successful fsck. The file system cannot be mounted for
read/write access unless the fs_clean field is VX_CLEAN.
fs_reserved
Reserved for future use.
fs_firstlogid
Initial log ID to use when the file system is mounted.
fs_time
Last time the super-block was written to disk, indicated
as the number of seconds that have elapsed since 00:00
Copyright 1994 Novell, Inc. Page 7
fs(4VXFS) (VXFS) fs(4VXFS)
January 1, 1970.
fs_fname
File system name (6 characters).
fs_fpack
File system pack label (6 characters).
fs_logversion
The version number of the log format. This field is set
by the kernel on each mount to ensure that an fsck
running log replay understands the log format written by
the kernel.
The log format may change with each release, so all file
systems should be clean before upgrading to a new
release.
The read-only area that supports the vxfs Version 2 layout has
the following fields:
fs_oltext
This is an array of two extent addresses. These extent
addresses point to the two replicated copies of the
first object location table extent.
fs_oltsize
This is the size, in blocks, of the object location
table extents pointed to by fs_oltext.
fs_iauimlen
The length, in blocks, of a free inode map in an inode
allocation unit.
fs_iausize
The size, in blocks, of an inode allocation unit.
fs_dinosize
The size, in bytes, of a disk inode. This is currently
256 bytes.
fs_checksum2
This is a checksum of the fields specific to the Version
2 layout.
Copyright 1994 Novell, Inc. Page 8
fs(4VXFS) (VXFS) fs(4VXFS)
REFERENCES
fsck(1M), fsdb(1M), vxfs-specific inode(4VXFS), mkfs(1M),
mount(2)
Copyright 1994 Novell, Inc. Page 9