Veritas™ File System 5.0.1 Programmer's Reference Guide

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 allocation policies are defined per file system and are persistent. There is no
fixed limit on the number of allocation policy definitions in a file system. Once a
policy is assigned, new file allocations are governed by the policy. For files allocated
before a policy was defined or assigned or when a policy on a file has been changed,
the policy can be enforced, causing the file to be re-allocated to the appropriate
volumes. Allocation policies can be inherited by a newly created file from its parent
directory. This is accomplished by specifying the FSAP_INHERIT flag when
assigning the policy to the parent directory.
Currently, there is no interface for determining where an existing file is currently
allocated. However, these APIs can be used to assign and enforce a policy on a file
to assure that the blocks are allocated properly.
Directing file allocations
Figure 3-1 shows how you might use the allocation policies to direct file allocations.
Figure 3-1
Directing File Allocations
/mnt
meta_policy = policy1
data_policy = policy2
dir1 (inherit flag)
meta_policy = policy3
data_policy = policy3
dir2
file1
file2
file3 file4
meta_policy = policy3
data_policy = policy3
The /mnt file system has 3 volumes in its volume set: vol-01, vol-02, and vol-03.
These volumes correspond to policy1, policy2, and policy3, respectively.
The file system has a policy assignment that allocates data as directed by policy1
and metadata as directed by policy2. These policies cause files to be allocated on
vol-01 and vol-02, except for dir1, which has overriding assignments for
allocation on vol-03.
When the file3 and file4 files are created, they are allocated on vol-02 as
directed by the policy1 and policy2 assignments. When file1 and file2 are
created, they are allocated on vol-03, as specified by policy3.
55Multi-volume support
Allocation policy application programming interfaces