Explains how to create a tiering policy for storage using either the Control System, the CLI, or the REST API.
Add Condition to add one of the following entities:
Click
Add condition group to add AND and OR conditions.
You can toggle the AND and OR conditions as needed.
Use the Rule expression option to create advanced rules that comprise a combination of the following expressions:
u |
Username or user ID, as configured in the OS registry (such as
/etc/passwd file, LDAP, etc.), of a specific
user.Usage:
|
g |
Group name or group ID, as configured in the OS registry (such as
/etc/group file, LDAP, etc.), of a specific group.
Usage:
|
a |
(atime) Time (in seconds or days) since the files were last
accessed. The number of seconds can be specified by appending s to
value and the number of days can be specified by appending d to the
value. Usage:
Note: If the system time on CLDB and file server nodes are different, the
atime rule for offloading data may not work as
intended.This tier rule is matched and files are offloaded, when all of the following conditions are met:
Assume that the |
m |
(mtime) Time (in seconds or days) since the files were last
modified. The number of seconds can be specified by appending s to
value and the number of days can be specified by appending d to the
value. Usage:
Note: If the system time on CLDB and file server nodes are different, the
mtime rule for offloading data may not work as intended.
|
s |
The size of the file in bytes, kilobytes, megabytes, or gigabytes. The size of
the file can be specified by appending one of the following to the value:
b for bytes, k for kilobytes, m
for megabytes, or g for gigabytes. Usage
|
p |
(Default) Specifies all files. Specifies that this operation is applicable to all the files without restriction. This cannot be combined with any other operator. |
"" |
Indicates none of the files. Specifies that this operation cannot be performed on any of the files. |
& |
AND operation to combine multiple expressions as the criteria for the rule. |
| |
OR operation to indicate either of the expressions as the criteria for the rule. |
() |
Delimiters for subexpressions. |
If a rule is not defined, the default rule, which is all files
(p), is associated with the storage
policy.
$ maprcli tier rule create -name <rule_name> -expr <expressions># curl -k -X POST 'https://abc.sj.us:8443/rest/tier/rule/create?name=rule1&expr=m:365d' --user mapr:mapr
{"timestamp":1519681475025,"timeofday":"2018-02-26 01:44:35.025 GMT-0800 PM","status":"OK","total":0,"data":[],"messages":["Successfully created rule: 'rule1'"]}For more information, see tier rule create.