test veritas logo


fsppmk(1M)

NAME

fsppmk - placement policy creation utility

AVAILABILITY

VRTSvxfs

SYNOPSIS

fsppmk policy [-A avg_period] [-b] -n policy_name
[-v version] [-e]

fsppmk rule [-b] [-n rule_name] [-t {data|ckpt}] [-e]

fsppmk select [-b] [-u user_name] [-U user_id]

[-g group_name] [-G group_id] [-p pattern [-r]]
[-d directory [-n]] [-t file_tag] [-e]

fsppmk create -b -d tier[:balance_size:{KB|MB|GB}], ... -e

fsppmk delete [-b] [-s tier, ...] [-e]

fsppmk relocate [-b] [-s tier, ...]

-d tier[:balance_size:{KB|MB|GB}], ... [-e]

fsppmk qualifier -b -q size -t {bytes|KB|MB|GB}

-c {gt|gteq|eq|lt|lteq},value -e

fsppmk qualifier -b -q modage -t {hours|days}

-c {gt|gteq|eq|lt|lteq},value -e

fsppmk qualifier -b -q accage -t {hours|days}

-c {gt|gteq|eq|lt|lteq},value -e

fsppmk qualifier [-a] -b [-P {high|low}] -q iotemp


[-T {days|hours}] -t {nrbytes|nwbytes|nrwbytes}
-c {gt|gteq|eq|lt|lteq},value -p days_or_hours -e

fsppmk qualifier [-a] -b [-P {high|low}] -q accesstemp


[-T {days|hours}] -t {nreads|nwrites|nrws}
-c {gt|gteq|eq|lt|lteq},value -p days_or_hours -e

DESCRIPTION

Each invocation of fsppmk command generates an XML construct for a portion of a placement policy. The fsppmk command outputs the generated XML to stdout. A series of outputs from this command can be concatenated to generate a complete placement policy.

The fsppmk command does not validate the resulting placement policy, although the policy can be validated by the fsppadm command.

Cluster File System Issues

No cluster issues; command operates the same on cluster file systems.

KEYWORDS

create Generates a CREATE element.
delete Generates a DELETE element.
policy Generates the leading XML headers with the DTD line and the PLACEMENT_POLICY element.
qualifier Generates the qualifier criteria for the RELOCATE and DELETE elements.
relocate Generates a RELOCATE element.
rule Generates a RULE element.
select Generates a SELECT element. Multiple SELECT elements can be generated by a series of fsppmk select commands, with first command invoked with the -b option but without the -e option, and the last command without the -b option but with the -e option, and with neither the -b nor the -e options in the intermediary invocations.

OPTIONS

-A Overrides the default duration of 24 hours that is used to compute the average file system temperature.
-a If specified, the value that you specify for iotemp or accesstemp via the -c option is treated as a multiple of the average temperature instead of the absolute value.
-b Specifies the beginning of an element. This option can be mandatory or optional depending on the context.
-c {gt|gteq|eq|lt|lteq},value
  Specifies the comparison condition and value for the qualifier.
-d directory Specifies the directory when specified with the select keyword.
-d tier[:balance_size:{KB|MB|GB}], ...
  Specifies the destination tiers, and the balance size and the size’s units for the destination tiers when specified with the relocate keyword.
-e Specifies the end of an element. This option can be mandatory or optional depending on the context.
-G group_id Specifies the numeric group ID.
-g group_name
  Specifies the group name.
-n Specifies nonrecursive. If specified, only files under the directory are selected, and all subdirectory trees are not selected. The -n option can only be specified with -d. The default is recursive.
-n policy_name
  Specifies the name of the placement policy when specified with the policy keyword.
-n rule_name Specifies the name of the RULE Element when specified with the rule keyword.
-P {high|low} Specifies a preference for files with a higher temperature or lower temperature, if the files satisfy the specified thresholds.
-p days_or_hours
  Specifies the period of time over which IOTEMP or ACCESSTEMP is monitored. You can specify the unit of the period of time with -T option. The default unit is days. The -t option is used for the same purpose as the ACCAGE and MODAGE elements.
-p pattern Specifies the filename pattern of a SELECT element, which determines to which files a rule applies.
-q {size|modage|accage|iotemp|accesstemp}
  Specifies the qualifier type.
-r Specifies recursive. If specified, patterns from subdirectories are included. -r can be specified only with -p.
-s tier, ... Specifies the source tiers.
-T {days|hours}
  Specifies the units for the period of time that is specified by the -p option. The default unit is days.
-t {bytes|KB|MB|GB|hours|days|nrbytes|nwbytes|nrwbytes}
  Specifies the units for the qualifier when specified with the relocate or delete keyword.
-t {data|ckpt}
  Specifies the type of the RULE element when specified with the rule keyword
-t file_tag Specifies the file tag when specified with the select keyword.
-U user_id Specifies the numeric user ID.
-u user_name Specifies the user name.
-v version Specifies the VxFS version for which to generate the XML headers, which can be 5.0 or later. If the -v option is not specified, fsppmk will create a version that is supported by the latest VxFS release. The default is 5.0.

EXAMPLES

The following series of commands create a placement policy, Policy1:

# fsppmk policy -b -n Policy1 \ -v 5.1 > /tmp/mypolicy.xml # fsppmk rule -b -n Rule1 \ -t data >> /tmp/mypolicy.xml # fsppmk select -b -u User1 \ -g Group1 -p \*.mpg -d /test/dir1 .e >> /tmp/mypolicy.xml # fsppmk relocate -b \ -d tier1:2:MB -s tier2,tier3 >> /tmp/mypolicy.xml # fsppmk qualifier -b -q iotemp \ -t nwbytes -c gteq,200 -p 10 -e >> /tmp/mypolicy.xml # fsppmk relocate -e >> /tmp/mypolicy.xml # fsppmk rule -e >> /tmp/mypolicy.xml # fsppmk policy -e >> /tmp/mypolicy.xml

The generated policy appears as follows:

# cat /tmp/mypolicy.xml <?xml version = "1.0"> <!DOCTYPE FILE_PLACEMENT_POLICY_SYSTEM "/opt/VRTSvxfs/etc/placement_policy.dtd"> <PLACEMENT_POLICY Name="Policy1" Version="5.1"> <RULE Name="Rule1" Flags="data"> <SELECT> <DIRECTORY Flags=" recursive "> /test/dir1 </DIRECTORY> <PATTERN Flags=" nonrecursive "> *.mpg </PATTERN> <USER> User1 </USER> <GROUP> Group1 </GROUP> </SELECT> <RELOCATE> <FROM> <SOURCE> <CLASS> tier2 </CLASS> </SOURCE> <SOURCE> <CLASS> tier3 </CLASS> </SOURCE> </FROM> <TO> <DESTINATION> <CLASS> tier1 </CLASS> <BALANCE_SIZE Units = "MB"> 2 </BALANCE_SIZE> </DESTINATION> </TO> <WHEN> <IOTEMP Type="nwbytes"> <MIN Flags="gteq"> 200 </MIN> <PERIOD Units="days"> 10 </PERIOD> </IOTEMP> </WHEN> </RELOCATE> </RULE> </PLACEMENT_POLICY>

Validate the policy before enforcing it:

# fsppadm validate /tmp/mypolicy.xml

The following command creates a placement policy, Policy2, that specifies 30 hours for computing the average file system temperature:


# fsppmk policy -A 30 -b -n Policy2 \ -v 5.1 > /tmp/mypolicy.xml

The generated policy appears as follows:

# cat /tmp/mypolicy.xml <?xml version = "1.0"> <!DOCTYPE FILE_PLACEMENT_POLICY_SYSTEM "/opt/VRTSvxfs/etc/placement_policy.dtd"> <PLACEMENT_POLICY Name="Policy1" Version="5.1"> </PLACEMENT_POLICY>

SEE ALSO

fsppadm(1M), fstag(1M)

Storage Foundation Administrator’s Guide


VxFS 7.4 fsppmk(1M)