Setting Quota for a Volume

About this task

You can set quotas for a volume using MCS and the CLI.

Setting Quota for a Volume Using the MapR Control System

About this task

To set volume quotas, in the Summary tab under Data > Volumes:

Procedure

  1. Ensure that the Usage column is displayed in the Volumes pane.
    If necessary, customize the columns to see the Usage column.
  2. Click the Set Quota link associated with the volume for which you want to set quotas.
    The Set Quota dialog displays.
  3. Specify the following:
    1. Hard quota, which raises an alarm when the threshold is reached and prevents further writes.
    2. Advisory quota, which raises an alarm when the threshold is reached, but does not prevent further writes.
    NOTE: Both, advisory and hard, quotas can be expressed in megabytes (MB), gigabytes (GB), which is the default, or terabytes (TB). Advisory quota cannot be greater than hard quota.
  4. Click Save Changes for the changes to take effect.

Setting Quota for a Volume Using the CLI or the REST API

About this task

You can set quotas for a volume when creating a new or modifying an existing volume.

The basic command to set quota for a volume is:

maprcli volume create -name <volName> -path <mountPath> -advisoryquota <advisoryQuota> -quota <hardQuota>
maprcli volume modify -name <volName> -advisoryquota <advisoryQuota> -quota <hardQuota>
Send a request of type POST. For example:
curl -k -X POST 'https://<hostname>:8443/rest/volume/create?name=<volName>&path=<mountPath>&advisoryquota=<advisoryQuota>&quota=<hardQuota>' --user mapr:mapr
curl -k -X POST 'https://<hostname>:8443/rest/volume/modify?name=<volName>&advisoryquota=<advisoryQuota>&quota=<hardQuota>' --user mapr:mapr

For the complete list of required and optional parameters, see volume create and volume modify.