Veritas File System 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)

Multi-Volume File Systems
Allocation Policies
Chapter 9 129
Allocation Policies
To make full use of the MVS features, VxFS supports allocation policies that allow assigning files or groups
of files to specified volumes within the volume set.
A policy specifies a list of volumes and the order of allocations. You can assign a policy to a file, to a file
system, or to a Storage Checkpoint created from a file system. When assigning policies to objects in the file
system, specify how the policy maps to both metadata and file data. For example, if a policy is assigned to a
single file, the file system must know where to place both the file data and metadata. If no policies are
specified, the file system places data randomly.
The following example shows how allocation policies work.Assume that there are two volumes from
different classes of storage:
# vxvset -g mdsdg list myvset
VOLUME INDEX LENGTH STATE CONTEXT
vol1 0 102400 ACTIVE -
vol2 1 102400 ACTIVE -
Create a file system on the myvset volume set and mount it:
# mkfs -F vxfs /dev/vx/rdsk/rootdg/myvset
version 6 layout
204800 sectors, 102400 blocks of size 1024, log size 1024 blocks
largefiles supported
# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1
Use the following fsapadm commands to define two allocation policies called datapolicy and
metadatapolicy to refer to the vol1 and vol2 volumes:
# fsapadm define /mnt1 datapolicy vol1
# fsapadm define /mnt1 metadatapolicy vol2
Assign these policies at the file system level. The data policy must be specified before the metadata policy:
# fsapadm assignfs /mnt1 datapolicy metadatapolicy
# fsvoladm list /mnt1
devid size used avail name
0 51200 1250 49950 vol1
1 51200 16 51184 vol2