Section: FSCLI (1)
Updated: January 2019


fsaddrelation – Add a directory-to-policy class association.


fsaddrelation [-F type] [-m mediaid] -c class directory


The fsaddrelation(1) command associates a directory with a policy class. Classes of data are delineated by assigning the directories on disk to policy classes. The directory specified in directory must not be superior to any directory that already has a directory-to-policy class relationship, nor may it be subordinate to any directory that has a relationship to a different class. The policy class relation point cannot be a directory in the root file system, and it is recommended that the command be executed before adding any files to the directory.

If the command must be run on a populated directory, it is recommended that the fsaddrelation(1) command be performed when the system is comparatively idle, understanding that the command is likely to take considerable time to complete. If the command is interrupted while running, it can leave content under that directory as unmanaged. If the command is rerun after encountering a failure on a populated directory, it will attempt to process any files and directories that were not processed during the failed execution.

Adding a directory relationship to a policy class causes the directory to become a migration directory under Tertiary Manager software control. A migration directory is one in which the files stored by client users are Tertiary Manager controlled media. The relationship can be removed by using the fsrmrelation(1) command after all files subordinate to the policy class relation point are removed.

fsaddrelation(1) will fail if directory has an affinity. If directory has an affinity associated with it, first use the cvaffinity(1) command to remove its affinity. Upon successful completion of fsaddrelation(1), if the class has any affinities, the directory will have its affinity set to the first affinity in the class affinity list.

Be aware that if directory has subordinate directories already in existence when this command is run, the subordinate directories will retain their current affinity association. In that case, the creation of any new files in those directories may result in allocations to unexpected stripe groups. Therefore, it is again strongly recommended that fsaddrelation(1) be executed before adding any files or subdirectories to directory.

When the first relation is added to a directory in a file system, that file system becomes a managed file system. An entry for the file system is added to the file system configuration file: $TM_DIR/config/filesystems. The entry is added with system defaults for values. If it is desired to change the defaults, edit the file and make the desired updates. The file itself has a description of the configuration values. When the last relation is removed from a file system, the entry is removed from the configuration file.

The identifier specified in class determines how media will be selected for use in migrating files in the specified directory. Only media containing files associated with the same policy class, or system blanks, will be selected.

The first file written to a medium taken from the system blank pool will determine which policy class the medium is associated with.

This command accepts upper case or lower case input.


This command is used as part of the process for converting a directory that has been previously managed by snpolicyd to now be managed by Storage Manager. Note that this is only useful if snpolicyd was used for storing files to LATTUS media since that is the only media type that snpolicyd and Tertiary Manager have in common.

This command can be used to add a relationship to any non-empty directory. When the command is to be used for adding a relationship to an snpolicy directory, where LATTUS was the target, then the -m option will be required. Beyond the normal processing for a non-empty directory when the -m is specified the files that were stored to LATTUS media by snpolicyd will have their info updated to reflect those file copies are already stored.

Note the command will fail if an attempt is made to add a relationship to a directory that has previously been managed by snpolicyd and the -m option is not provided with a valid LATTUS media.


Path name of the directory to be associated with the policy class. The directory must already exist and the name must be less than 256 characters long. The entire path name need not be entered. If preceded by a slash (/) in the command definition, the full path name (starting from the root directory) is required as input to the command. Otherwise, the Tertiary Manager command expands the directory name using the current working directory as the parent.
-c class
Policy class to be associated with the directory. A policy class name can be a maximum of 16 alphanumeric characters. The special “-“, “.”, and “_” characters are also permitted.
-m mediaid
The LATTUS mediaid that contains the files under the directory to be processed. The media specified must have already been configured using fsobjcfg. (See SNPOLICY CONVERSION above.)
-F type
Sets the output format to the specified type. Valid values are TEXT (default) or JSON.
TEXT is the “legacy” textual format.
JSON (JavaScript Object Notation) is a lightweight text-based open standard designed for human-readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for virtually every programming language. The JSON format is often used for serializing and transmitting structured data over a network connection. It is primarily used to transmit data between a server and web application. See http://json.org for more information.


fsrmrelation(1), fsclassinfo(1), fsdirclass(1), filesystems(4)