Assigning pattern tables to directories

A pattern table contains patterns against which a file's name and creating process' UID and GID are matched as a file is created in a specified directory. The first successful match is used to set the allocation policies of the file, taking precedence over inheriting per-file allocation policies.

See the fsapadm(1M) manual page.

The following example shows how to assign pattern tables to a directory in a volume set that contains two volumes from different classes of storage. The pattern table matches all files created in the directory dir1 with the .mp3 extension for any user or group ID and assigns the mp3data data policy and mp3meta metadata policy.

To assign pattern tables to directories

  1. Define two allocation policies called mp3data and mp3meta to refer to the vol1 and vol2 volumes:

      # fsapadm define /mnt1 mp3data vol1
      # fsapadm define /mnt1 mp3meta vol2
  2. Assign the pattern table:

      # fsapadm assignfilepat dir1 *.mp3///mp3data/mp3meta/