Veritas™ File System 5.0.1 Programmer's Reference Guide
When file4 is created, the initial allocation is on vol-01 and vol-02. To move
file4 to vol-03, assign policy3 to file4 and enforce that policy on the file. This
reallocates file4 to vol-03.
To direct file allocations
1
Create the allocation policies on the /mnt file system.
2
Assign the data and metadata allocation policies to the /mnt file system as
policy1 and policy2.
3
Assign the data and metadata allocation policies to dir1 with the INHERIT
flag, with both as policy3.
4
Create file4 (100MB), which becomes allocated to vol-02.
5
Create file3 (10MB), which becomes allocated to vol-02.
6
Create file2 (100MB), which becomes allocated to vol-03.
7
Create file1 (100MB), which becomes allocated to vol-03.
8
Assign the data and metadata allocation policies to file4, with both as
policy3.
9
Enforce the allocation policies on file4, which reallocates the file to vol-03.
Creating and assigning policies
The following function calls create and assign a policy using the multi-volume
API.
■ To define a policy for a file system, use the following function call:
vxfs_ap_define(fd, fsap_info_ptr, 0);
■ To assign a policy to a file system, use the following function call:
vxfs_ap_assign_fs(fd, data_policy, meta_policy);
■ To assign a policy to a file or directory, use the following function call:
vxfs_ap_assign_file(fd, data_policy, meta_policy, 0);
■ To assign a policy to a Storage Checkpoint, use the following function call:
vxfs_ap_assign_ckpt(fd, checkpoint_name, data_policy, meta_policy);
■ To assign a policy to all Storage Checkpoints, use the following function call:
Multi-volume support
Allocation policy application programming interfaces
56