Removing a Storage Policy

Explains how to remove tiering policies for storage using either the Control System, the CLI, or the REST API.

About this task

WARNING
You cannot remove a storage policy that is associated with a volume.

Removing a Rule Using the Control System

Procedure

  1. Log in to the Control System and go to Storage Policies tab under Data > Volumes.
    NOTE
    The Volumes page is under the Volumes menu in the Kubernetes version of the Control System.
    The list of storage policies displays.
  2. Select the checkbox associated with the storage policy to remove and click Remove Policy.
    The Remove Policy confirmation window displays.
  3. Review the list of policies to remove and click Remove.

Removing a Rule Using the CLI and the REST API

About this task

Run the following command to remove a storage policy that is not associated with a volume:
# maprcli tier rule remove -name <rule_name>
If you try to remove a rule associated with a volume, the command returns an error (shown in bold) similar to the following:
# maprcli tier rule remove -name rule1 -json
{
   "timestamp":1516771655669,
   "timeofday":"2018-01-23 09:27:35.669 GMT-0800",
   "status":"ERROR",
   "errors":[{
      "id":10003,
      "desc":"Cannot remove rule, as some volumes are still using it."
   }]
}
Send a request of type POST. For example:
# curl -k -X POST 'https://abc.sj.us:8443/rest/tier/rule/remove?name=sampleRule' --user mapr:mapr
{"timestamp":1523571783113,"timeofday":"2018-04-12 03:23:03.113 GMT-0700 PM","status":"OK","total":0,"data":[],"messages":["Successfully deleted rule: 'sampleRule'"]}
If you try to remove a storage policy associated with a volume, the response contains an error (shown in bold) similar to the following:
# curl -k -X POST 'https://abc.sj.us:8443/rest/tier/rule/remove?name=sampleRule' --user mapr:mapr
{"timestamp":1523571741636,"timeofday":"2018-04-12 03:22:21.636 GMT-0700 PM","status":"ERROR","errors":[{"id":10003,"desc":"Can not remove rule, as some volumes are still using it."}]}

For more information, see tier rule remove.