APIs in Category: qtree | 7-Mode API version 1.21

qtree-create qtree-delete qtree-list qtree-list-iter-end qtree-list-iter-next qtree-list-iter-start qtree-rename | Because of possible large amount of information returned by qtree list, it is highly recommended to use the qtree list iterator APIs. There are three iterator APIs for qtree list: -start, -next, and -end.

NetApp Manage ONTAP

qtree-create | [top]

> Create a new qtree.

> Input Name | Range | Type | Description
> mode |  | string optional | The file permission bits of the qtree. Similar to UNIX permission bits: 0755 gives read/write/execute permissions to owner and read/execute to group and other users. It consists of 4 octal digits derived by adding up bits 4, 2, and 1. Omitted digits are assumed to be zeros. First digit selects the set user ID (4), set group ID (2), and sticky (1) attributes. The second digit selects permissions for the owner of the file: read (4), write (2), and execute (1); the third selects permissions for other users in the same group; the fourth for other users not in the group. For unclustered volumes, if this argument is missing, use the value specified in the option "wafl.default_qtree_mode". For clustered volumes, if this argument is missing, the permissions of the volume is used.
> qtree |  | string | The path of the qtree, relative to the volume.
> volume |  | string | Name of the volume on which to create the qtree

> Errno | Description
> EVOLUMEBUSY |  |
> EVOLUMEDOESNOTEXIST |  |
> EQTREEEXISTS |  |
> EQTREENOTOWNER |  |
> EVOLUMEOFFLINE |  |
> EVOLUMEREADONLY |  |
> EONTAPI_EINVAL |  |
> EVSERVERNOTFOUND |  |
> EAGGRDOESNOTEXIST |  |
> EAGGRNOTONLINE |  |
> EAGGRFAILINGOVER |  |
> EAGGRRELOCATING |  |
> EAGGRMISMATCH |  |
> EQTREEMAX |  |
> EINVALIDDSID |  |
> EAMBIGUOUS_DSID |  |
> EVOL_RESTRICTED |  |
> EINTERNALERROR |  |
> EVSERVER_OP_NOT_ALLOWED |  |
> EVOLUME_TYPE_NOT_SUPPORTED |  |
> EAPIMISSINGARGUMENT |  |

> Vfiler-enabled
> Yes

qtree-delete | [top]

> Delete the specified qtree. For unclustered volumes, use the quota management APIs to delete the quota rules that reference this qtree in the /etc/quotas file. For clustered volumes, all the quota rules that reference this qtree will be automatically deleted.

> Input Name | Range | Type | Description
> force |  | boolean optional | Force the deletion of the qtree even if it not empty. On using "force" option, ZAPI may take a long time to complete because the contents of the entire qtree will have to be deleted before it returns. Default: false For clustered volumes, if the qtree has a large number of files, it is recommended that the qtree-delete-async API be used.
> qtree |  | string | Path of an existing qtree. The path should be in this format: /vol/< volume name >/< qtree name >.

> Errno | Description
> EVOLUMEBUSY |  |
> EVOLUMEDOESNOTEXIST |  |
> EQTREENOTOWNER |  |
> EVOLUMEOFFLINE |  |
> EONTAPI_EINVAL |  |
> EONTAPI_EALREADY |  |
> EONTAPI_EROFS |  |
> EONTAPI_ENOENT |  |
> EONTAPI_ENOTEMPTY |  |
> EVSERVERNOTFOUND |  |
> EAGGRDOESNOTEXIST |  |
> EAGGRNOTONLINE |  |
> EAGGRFAILINGOVER |  |
> EAGGRRELOCATING |  |
> EAGGRMISMATCH |  |
> EINVALIDDSID |  |
> EAMBIGUOUS_DSID |  |
> EVOL_RESTRICTED |  |
> EINTERNALERROR |  |
> EVSERVER_OP_NOT_ALLOWED |  |
> EVOLUME_TYPE_NOT_SUPPORTED |  |
> EAPIMISSINGARGUMENT |  |

> Vfiler-enabled
> Yes

qtree-list | [top]

> Return list of qtrees

> Input Name | Range | Type | Description
> volume |  | string optional | Name of the volume to be queried. Do not include a "/vol/" prefix.
> Output Name | Range | Type | Description
> qtrees |  | qtree-info[] | An array, one entry per qtree.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EQTREE_SECURITY_GET_FAILED |  |
> EQTREE_OPLOCK_GET_FAILED |  |
> EVOLUMEBUSY |  |

> Vfiler-enabled
> Yes

qtree-list-iter-end | [top]

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

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

> Vfiler-enabled
> Yes

qtree-list-iter-next | [top]

> Continues an iteration through the list of qtrees

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

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMEBUSY |  |

> Vfiler-enabled
> Yes

qtree-list-iter-start | [top]

> Starts an iteration through the list of qtrees.

> Output Name | Range | Type | Description
> records |  | integer | Number of items that have been saved for future retrieval with qtree-list-iter-next.
> tag |  | string | Tag to be used in subsequent iterations.

> Errno | Description
> EVOLUMEDOESNOTEXIST |  |
> EQTREE_SECURITY_GET_FAILED |  |
> EQTREE_OPLOCK_GET_FAILED |  |
> EVOLUMEBUSY |  |

> Vfiler-enabled
> Yes

qtree-rename | [top]

> Renames the specified qtree to a new name specified by "new-qtree-name". For unclustered volumes, if the qtree is referenced in the file /etc/exportfs, use NFS API nfs-exportfs-append-rules to modify the file so that the affected file system can be exported by the filer immediately. The "qtree-rename" command does not automatically update the /etc/exports file. Also, if the qtree is referenced in the file /etc/quotas, use the quota management APIs to delete and re-create the quota rule with the new qtree name. For clustered volumes, the qtree name in the quota rules will be automatically updated with the new qtree name.

> Input Name | Range | Type | Description
> new-qtree-name |  | string | Path of new qtree. The path should be in this format: /vol/< volume name >/< dst qtree name >.
> qtree |  | string | Path of an existing qtree. The path should be in this format: /vol/< volume name >/< src qtree name >.

> Errno | Description
> EVOLUMEBUSY |  |
> EVOLUMEDOESNOTEXIST |  |
> EQTREENOTOWNER |  |
> EVOLUMEOFFLINE |  |
> EONTAPI_EEXIST |  |
> EONTAPI_EROFS |  |
> EONTAPI_EINVAL |  |
> EONTAPI_ENOENT |  |
> EVSERVERNOTFOUND |  |
> EAGGRDOESNOTEXIST |  |
> EAGGRNOTONLINE |  |
> EAGGRFAILINGOVER |  |
> EAGGRRELOCATING |  |
> EAGGRMISMATCH |  |
> EINVALIDDSID |  |
> EAMBIGUOUS_DSID |  |
> EVOL_RESTRICTED |  |
> EINTERNALERROR |  |
> EVSERVER_OP_NOT_ALLOWED |  |
> EVOLUME_TYPE_NOT_SUPPORTED |  |
> EAPIMISSINGARGUMENT |  |

> Vfiler-enabled
> Yes

Element definition: qtree-info | [top]

> Information about a single qtree.

> Name | Range | Type | Description
> export-policy |  | string optional | Export policy of the qtree.
> id | [0..4994] | integer | Id of the qtree (unique within the volume), which is 0 if qtree is the volume itself.
> is-export-policy-inherited |  | boolean optional | If true, this qtree inherits the export policy of the parent volume.
> oplocks |  | string | Indicates whether opportunistic locks are enabled on the qtree. Possible values: "enabled", "disabled".
> owning-vfiler |  | string optional | Name of the vfiler which owns this qtree. This value will be returned only if the request is coming to vfiler0 and MultiStore is licensed.
> qtree |  | string | Name of the qtree, blank if qtree is the volume itself
> security-style |  | string | Security style of the qtree. Possible values are "unix", "ntfs", or "mixed".
> status |  | string | Status of the qtree. Possible values include: "snapvaulted", "snapmirrored", "normal", and "readonly".
> volume |  | string | Name of the volume containing the qtree