APIs in Category: quota | API version 1.8

quota-add-entry quota-delete-entry quota-get-entry quota-list-entries quota-list-entries-iter-end quota-list-entries-iter-next quota-list-entries-iter-start quota-modify-entry quota-off quota-on quota-report quota-report-iter-end quota-report-iter-next quota-report-iter-start quota-resize quota-set-entry quota-status | The quota APIs are divided into two groups: management and editing. The management functions are: report, status, turning on, and turning off, while the editing functions are: list, add, delete, modify, and set. The file /etc/quotas is manipulated by the editing functions; therefore changes to /etc/quotas will effect the results of the APIs. For more information on quotas, please see na_quota(1) and na_quotas(5). A quota is uniquely identifed by the type, target, volume, and qtree. There are three types: user, group, and tree. For example: a user quota is specified by type = user, target = zapi, volume = vol0, and qtree = /vol/vol0/lab. A group quota is specified by type = group, target = eng, volume = engvol, and qtree = "". Finally, a qtree quota is specifed by type = tree, target = /vol/engvol/bio, volume = engvol, and qtree = "". Default quotas are specified as an asterisk, "*", for the target. For example, a default user quota is specified by type = user, target = *, volume = vol1, and qtree = /vol/vol1/elvis. Because of possible large amount of information returned by quota reports and quota lists, it is highly recommended to use the quota report and quota list iterator APIs. There are three iterator APIs for both quota report and quota list: -start, -next, and -end.

NetApp Manage ONTAP

quota-add-entry | [top]

> Adds a quota entry. If the type, target, volume, and tree do not exist, a new entry is created. If the type, target, volume, and tree exist, then an error is returned.

> Input Name | Range | Type | Description
> disk-limit |  | string optional | This is the amount of disk space that is reserved for the the target. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is unlimited.
> file-limit |  | string optional | This is the number of files that the target can have. Set the value to "-" if the limit is to be unlimited. Default is unlimited.
> qtree |  | string | This is the qtree name that the quota resides on. It can be the qtree name or "" if no qtree.
> quota-target |  | string | This is the quota target of the type specified. The target can be of the form: <name>, <number>, or <path name>. Multiple targets can be specified by a comma-separated list.
> quota-type |  | string | This is the quota type: "user", "group", or "tree".
> soft-disk-limit |  | string optional | This is the amount of disk space the target would have to exceed before a message is logged and an SNMP trap is generated. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is unlimited.
> soft-file-limit |  | string optional | This is the number of files the target would have to exceed before a message is logged and an SNMP trap is generated. Set the value to "-" if the limit is to be unlimited. Default is unlimited.
> threshold |  | string optional | This is the amount of disk space the target would have to exceed before a message is logged. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is unlimited.
> volume |  | string | This is the volume name that the quota resides on.

> Errno | Description
> EQUOTAEXISTS |  |
> EQUOTAINVALID |  |
> EQUOTADIRECTIVE |  |

> Vfiler-enabled
> Yes

quota-delete-entry | [top]

> Deletes a quota entry specified by type, target, volume, and tree.

> Input Name | Range | Type | Description
> qtree |  | string | Name of the qtree for the quota. It can be the qtree name or "" if no qtree.
> quota-target |  | string | The quota target of the type specified. Possible values are: <name>, <number>, or <path name>. Multiple targets can be specified by a comma-separated list.
> quota-type |  | string | Quota type: "user", "group", or "tree".
> volume |  | string | Name of the volume for the quota.

> Errno | Description
> EQUOTAINVALID |  |
> EQUOTADIRECTIVE |  |

> Vfiler-enabled
> Yes

quota-get-entry | [top]

> Obtains a quota entry specified by type, target, volume, and tree.

> Input Name | Range | Type | Description
> qtree |  | string | Name of the qtree for the quota. It can be the qtree name or "" if no qtree.
> quota-target |  | string | The quota target of the type specified. Possible values are: <name>, <number>, or <path name>. Multiple targets can be specified by a comma-separated list.
> quota-type |  | string | The quota type: "user", "group", or "tree".
> volume |  | string | Name of the volume for the quota.
> Output Name | Range | Type | Description
> disk-limit |  | string | The amount of disk space that is reserved for the the target. The value is expressed in kilobytes (1024). The value is "-" if the limit is unlimited.
> file-limit |  | string | The number of files that the target can have. The value is "-" if the limit is unlimited.
> perform-user-mapping |  | boolean | If the value is true, quota management will perform user mapping according to /etc/usermap.cfg.
> quota-error |  | quota-error optional | This value is only present if there is an error, and gives complete details on the error in a specific quota entry.
> soft-disk-limit |  | string | The amount of disk space the target would have to exceed before a message is logged and an SNMP trap is generated. The value is expressed in kilobytes (1024). The value is "-" if the limit is unlimited.
> soft-file-limit |  | string | The number of files the target would have to exceed before a message is logged and an SNMP trap is generated. The value is "-" if the limit is unlimited.
> threshold |  | string | The amount of disk space the target would have to exceed before a message is logged. The value is expressed in kilobytes (1024). The value is "-" if the limit is unlimited.

> Errno | Description
> EQUOTAPARSEERROR |  |
> EQUOTAINVALID |  |
> EQUOTADOESNOTEXIST |  |
> EQUOTADIRECTIVE |  |

> Vfiler-enabled
> Yes

quota-list-entries | [top]

> Returns quota entries from the /etc/quotas file.

> Input Name | Range | Type | Description
> include-output-entry |  | boolean optional | If specified and true, the raw quota entry is placed in the output element.
> Output Name | Range | Type | Description
> quota-entries |  | quota-entry[] | An array of quota entries.

> Vfiler-enabled
> Yes

quota-list-entries-iter-end | [top]

> Terminate a list iteration and clean up any saved info.

> Input Name | Range | Type | Description
> tag |  | string | Tag from a previous quota-list-entries-iter-start.

> Vfiler-enabled
> Yes

quota-list-entries-iter-next | [top]

> Continues an iteration through the list of quotas.

> Input Name | Range | Type | Description
> maximum |  | integer | The maximum number of entries to retrieve.
> tag |  | string | Tag from a previous quota-list-entries-iter-start.
> Output Name | Range | Type | Description
> quota-entries |  | quota-entry[] optional | An array of quota information.
> records |  | integer | This tells you how many records are being returned from this particular call to quota-list-entries-iter-next. When this value is 0, you have retrieved everything.

> Vfiler-enabled
> Yes

quota-list-entries-iter-start | [top]

> Starts an iteration through the list of quotas entries in /etc/quotas.

> Input Name | Range | Type | Description
> include-output-entry |  | boolean optional | If specified and true, the entire quota entry is placed in the ouput elements.
> Output Name | Range | Type | Description
> records |  | integer | This tells you the number of items that have been saved for future retrieval with quota-list-entries-iter-next.
> tag |  | string | Tag to be used in subsequent iterations.

> Vfiler-enabled
> Yes

quota-modify-entry | [top]

> Modifys a quota entry. If the type, target, volume, and tree exist, the entry is modified. If the type, target, volume, and tree do not exist, then an error is returned.

> Input Name | Range | Type | Description
> disk-limit |  | string optional | This is the amount of disk space that is reserved for the the target. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is the current value.
> file-limit |  | string optional | This is the number of files that the target can have. Set the value to "-" if the limit is to be unlimited. Default is the current value.
> qtree |  | string | This is the qtree name that the quota resides on. It can be the qtree name or "" if no qtree.
> quota-target |  | string | This is the quota target of the type specified. The target can be of the form: <name>, <number>, or <path name>. Multiple targets can be specified by a comma-separated list.
> quota-type |  | string | Quota type: "user", "group", or "tree".
> soft-disk-limit |  | string optional | This is the amount of disk space the target would have to exceed before a message is logged and an SNMP trap is generated. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is the current value.
> soft-file-limit |  | string optional | This is the number of files the target would have to exceed before a message is logged and an SNMP trap is generated. Set the value to "-" if the limit is to be unlimited. Default is the current value.
> threshold |  | string optional | This is the amount of disk space the target would have to exceed before a message is logged. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited. Default is the current value.
> volume |  | string | This is the volume name that the quota resides on.

> Errno | Description
> EQUOTADOESNOTEXIST |  |
> EQUOTAINVALID |  |
> EQUOTADIRECTIVE |  |

> Vfiler-enabled
> Yes

quota-off | [top]

> Turns the quota subsystem off for a volume.

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume on which to turn quotas off.

> Vfiler-enabled
> Yes

quota-on | [top]

> Starts to turn quotas on for a volume. A successful return from this API does not mean that quotas are on, merely that an attempt to start it has been triggered. Use the quota-status API to check the status.

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume on which to enable quotas.

> Vfiler-enabled
> Yes

quota-report | [top]

> Returns a report on all quotas.

> Input Name | Range | Type | Description
> path |  | string optional | If specified, the report will contain only quotas that apply to the specified path name. The path should start with "/vol/", although paths without the "/vol" prefix will work and will be assumed to be in the root volume.
> volume |  | string optional | If provided, the report will contain only quotas on the specified volume name. The name should not contain a "/vol/" prefix.
> Output Name | Range | Type | Description
> error |  | error optional | If an error occurs in the midst of a report, this element is included in the output to indicate it (because it's too late at that point to include it in the main of the API. This structure includes the same information (status, reason, errno) that is normally included as attributes on the of the API itself. This error output element is also used to report the fact that quotas are off, if they are not currently turned on.
> quotas |  | quota[] | An array of quotas.

> Vfiler-enabled
> Yes

quota-report-iter-end | [top]

> Terminate a list iteration and clean up any saved info.

> Input Name | Range | Type | Description
> tag |  | string | Tag from a previous quota-report-iter-start.

> Vfiler-enabled
> Yes

quota-report-iter-next | [top]

> Returns items from a previous call to quota-report-iter-start

> Input Name | Range | Type | Description
> maximum |  | integer | The maximum number of entries to retrieve.
> tag |  | string | Tag from a previous quota-report-iter-start.
> Output Name | Range | Type | Description
> quotas |  | quota-info[] optional | An array of quotas.
> records |  | integer | This tells you how many records are being returned from this particular call to quota-report-iter-next. When this value is 0, you have retrieved everything.

> Vfiler-enabled
> Yes

quota-report-iter-start | [top]

> Generates a report on quotas, the results of which are retrieved by using quota-report-iter-next.

> Input Name | Range | Type | Description
> path |  | string optional | A path (including a /vol/ prefix). If specified, the report will contain only quotas that apply to the specified path name.
> volume |  | string optional | Name of a volume. If specified, the report will contain only quotas on the specified volume.
> Output Name | Range | Type | Description
> error |  | error optional | If an error occurs in the midst of a report, this element is included to indicate it. It includes the same information that is normally included as attributes on the element.
> records |  | integer | Number which tells you how many items have been saved for future retrieval with quota-report-iter-next.
> tag |  | string | Tag to be used in subsequent calls to quota-report-iter-next.

> Vfiler-enabled
> Yes

quota-resize | [top]

> Starts an ONTAP operation to resize quotas for a volume. A successful return from this API does not mean that the operation has finished, merely that an attempt to start it been triggered. Use the quota-status API to check the status.

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume on which to resize quotas.

quota-set-entry | [top]

> Sets a quota entry. If the type, target, volume, and tree do not exist, a new entry is created. If the type, target, volume, and tree exist, then the entry is modified.

> Input Name | Range | Type | Description
> disk-limit |  | string optional | The amount of disk space that is reserved for the the target. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited.
> file-limit |  | string optional | The number of files that the target can have. Set the value to "-" if the limit is to be unlimited.
> qtree |  | string | Name of the qtree for the quota. It can be the qtree name or "" if no qtree.
> quota-target |  | string | The quota target of the type specified. Possible values are <name>, <number>, or <path name>. Multiple targets can be specified by a comma-separated list.
> quota-type |  | string | The quota type: "user", "group", or "tree".
> soft-disk-limit |  | string optional | The amount of disk space the target would have to exceed before a message is logged and an SNMP trap is generated. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited.
> soft-file-limit |  | string optional | The number of files the target would have to exceed before a message is logged and an SNMP trap is generated. Set the value to "-" if the limit is to be unlimited.
> threshold |  | string optional | The amount of disk space the target would have to exceed before a message is logged. The value is expressed in kilobytes (1024). Set the value to "-" if the limit is to be unlimited.
> volume |  | string | Name of the volume for the quota.

> Errno | Description
> EQUOTAINVALID |  |
> EQUOTADIRECTIVE |  |

> Vfiler-enabled
> Yes

quota-status | [top]

> Obtains the status of quotas

> Input Name | Range | Type | Description
> volume |  | string | Name of the volume whose quota status should be obtained.
> Output Name | Range | Type | Description
> percent-complete |  | integer optional | The percentage complete for an "on" or "resize" operation. This is present when the status is "resizing" or "initializing".
> quota-errors |  | string optional | Collection of quota errors including the value of the reason tag above. Each error will be separated by a newline, '\n'. Since the quota parser does not stop when a parsing error occurs, this tag returns all the errors from the quota parser. If not present, there are no errors.
> reason |  | string optional | The last quota error message. If not present, there are no errors.
> status |  | string | Primary status of quotas on the indicated volume; Possible values: "on", "off", "resizing", "initializing", and "shutting down".
> substatus |  | string | Minor quota status on the indicated volume. This status is only valid when primary status is "resizing" or "initializing". Possible values are: "scanning", "etc scanning", "setup", "queue scan", "done", and "none".

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |

> Vfiler-enabled
> Yes

Element definition: error | [top]

> Information about a single error.

> Name | Range | Type | Description
> errno |  | integer | The error number.
> reason |  | string | A human-readable readable error message.
> status |  | string | Either 'passed' or 'failed'.

Element definition: quota | [top]

> Information about a single quota.

> Name | Range | Type | Description
> disk-limit |  | string | Maximum amount of disk space, in kilobytes, allowed for the quota target (hard disk space limit). The value is "-" if the limit is unlimited.
> disk-used |  | string | Current amount of disk space, in kilobytes, used by the quota target. The value is "-" if the limit is unlimited.
> file-limit |  | string | Maximum number of files allowed for the quota target (hard files limit). The value is "-" if the limit is unlimited.
> files-used |  | string | Current number of files used by the quota target. The value is "-" if the limit is unlimited.
> quota-target |  | string | For an explicit quota, this value is a fully qualified quota target which is the quota target specified in the /etc/quotas file and the domain in the QUOTA_TARGET_DOMAIN directive is in effect. See na_quotas(5) for more information. Mulitple targets are comma separated. For a derived quota, the field is blank.
> quota-type |  | string | The type of quota: user, group, or tree.
> quota-users |  | quota-user[] | A list of quota users and group.
> soft-disk-limit |  | string | Soft disk space limit, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
> soft-file-limit |  | string | Soft file limit, in number of files, for the quota target. The value is "-" if the limit is unlimited.
> threshold |  | string | Disk space threshold, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
> tree |  | string | Name of the qtree to which the quota is applied.
> vfiler |  | string optional | Name of the vfiler to which the quota applies, if vfilers are in use.
> volume |  | string | Name of the volume to which the quota is applied.

Element definition: quota-entry | [top]

> Information about a single entry in the /etc/quotas file.

> Name | Range | Type | Description
> line |  | string optional | The raw line from /etc/quotas. This is only returned when the input element is set to true. It is returned whether there is an error or not.
> qtree |  | string optional | Name of the qtree for the quota. It can be the qtree name or "" if no qtree. If there is an error in the quota entry, this value might not present.
> quota-error |  | quota-error optional | This value is only present if there is an error, and gives complete details for an error for a specific quota entry.
> quota-target |  | string optional | The quota target of the type specified. The value will be one of: <name>, <number>, or <path name>. Mulitple targets can be specified by a comman-separated list. Quota directives in /etc/quotas are used to form the quota target. If there is an error in the quota entry, this value might not present.
> quota-type |  | string optional | The quota type: "user", "group", or "tree". If there is an error in the quota entry, this value might not present.
> volume |  | string optional | Name of the volume for the quota. If there is an error in the quota entry, this value might not present.

Element definition: quota-error | [top]

> Information about a single quota error.

> Name | Range | Type | Description
> detail |  | string | More details about the error.
> errno |  | integer | The error number.
> reason |  | string | A human-readable concise reason for the error.

Element definition: quota-info | [top]

> Information about a single quota.

> Name | Range | Type | Description
> disk-limit |  | string | Maximum amount of disk space, in kilobytes, allowed for the quota target (hard disk space limit). The value is "-" if the limit is unlimited.
> disk-used |  | string | Current amount of disk space, in kilobytes, used by the quota target. The value is "-" if the limit is unlimited.
> file-limit |  | string | Maximum number of files allowed for the quota target (hard files limit). The value is "-" if the limit is unlimited.
> files-used |  | string | Current number of files used by the quota target. The value is "-" if the limit is unlimited.
> qtree |  | string | Name of qtree to which the quota is applied.
> quota-target |  | string | For an explicit quota, this value is a fully qualified quota target which is the quota target specified in the /etc/quotas file and the domain in the QUOTA_TARGET_DOMAIN directive is in effect. See na_quotas(5) for more information. Mulitple targets are comma separated. For a derived quota, the field is blank.
> quota-type |  | string | Quota type, which can be user, group, or tree
> quota-users |  | quota-user[] | A list of quota users.
> soft-disk-limit |  | string | Soft disk space limit, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
> soft-file-limit |  | string | Soft file limit, in number of files, for the quota target. The value is "-" if the limit is unlimited.
> threshold |  | string | Disk space threshold, in kilobytes, for the quota target. The value is "-" if the limit is unlimited.
> vfiler |  | string optional | Name of the vfiler to which the quota applies.
> volume |  | string | Name of volume to which the quota is applied.

Element definition: quota-user | [top]

> Information about a quota user or group.

> Name | Range | Type | Description
> quota-user-id |  | string | The id of the user. The quota-user-type determines the format. For uid and gid, the format is an integer. For sid, the format is the usual "S-*" style.
> quota-user-name |  | string | Name of the user, group, or sid.
> quota-user-type |  | string | The type of quota user. There are two possible values: sid (for Windows users), uid (for UNIX users), and gid (for UNIX groups).