Symantec logo

Creating and assigning policies

The following example creates and assigns a policy using the multi-volume API.

 To create and assign a policy

  1. To define a policy for a file system, use the following function call:

vxfs_ap_define(fd, fsap_info_ptr, 0);

  1. To assign a policy to a file system, use the following function call:

vxfs_ap_assign_fs(fd, data_policy, meta_policy);

  1. To assign a policy to a file or directory, use the following function call:

vxfs_ap_assign_file(fd, data_policy, meta_policy, 0);

  1. To assign a policy to a Storage Checkpoint, use the following function call:

vxfs_ap_assign_ckpt( fd, checkpoint_name, data_policy,

meta_policy);

  1. To assign a pattern-based allocation policy to a directory, use the following function call:

    vxfs_ap_assign_file_pat(int fd, struct fsap_pattern_table \

#pat_assign, uint32_t flags);

See Pattern-based policies.

  1. To assign a pattern-based allocation policy to a file system, use the following function call:

vxfs_ap_assign_fs_pat(int fd, struct fsap_pattern_table \

#pat_assign, uint32_t flags);