Symantec logo

Assigning allocation policies

The following example shows how to assign allocation policies. The example volume set contains two volumes from different classes of storage.

 To assign allocation policies

  1. List the volumes in the volume set:

# vxvset -g rootdg list myvset

VOLUME INDEX LENGTH STATE CONTEXT

vol1 0 102400 ACTIVE -

vol2 1 102400 ACTIVE -

  1. Create a file system on the myvset volume set and mount it:

# mkfs -F vxfs /dev/vx/rdsk/rootdg/myvset

version 7 layout

204800 sectors, 102400 blocks of size 1024,

log size 1024 blocks

largefiles supported

# mount -F vxfs /dev/vx/dsk/rootdg/myvset /mnt1

  1. 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

  1. Assign the 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

The assignment of the policies on a file system-wide basis ensures that any metadata allocated is stored on the device with the policy "metadatapolicy" (vol2) and all user data is be stored on vol1 with the associated "datapolicy" policy.