APIs in Category: qtree
Vserver API version 1.15

 
qtree-create
qtree-delete
qtree-delete-async
qtree-list-iter
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.

oplocks string
optional
Opportunistic locks mode of the qtree. Possible values: "enabled", "disabled". Default value is the oplock mode of the volume.
qtree string
The path of the qtree, relative to the volume.
security-style string
optional
Security style of the qtree. Possible values: "unix", "ntfs", or "mixed". Default value is the security style of 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
 EAGGRMISMATCH
 EQTREEMAX
 EINVALIDDSID
 EAMBIGUOUS_DSID
 EVOL_RESTRICTED
 EINTERNALERROR
 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
 EAGGRMISMATCH
 EINVALIDDSID
 EAMBIGUOUS_DSID
 EVOL_RESTRICTED
 EINTERNALERROR
 Vfiler-enabled
 Yes

 
qtree-delete-async [top]
Delete the specified qtree by spawning a background job. The jobid will be returned. The progress of the job can be tracked using the job APIs. 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. Default: false
qtree string
Path of an existing qtree. The path should be in this format: /vol/< volume name >/< qtree name >.
 
Output Name Range Type Description
result-error-code [0..2^32-1] integer
optional
Error code, if the operation caused an error.
result-error-message string
optional
Error description, if the operation caused an error.
result-jobid [0..2^64-1] integer
The job id of the job that was queued to delete the qtree.
result-status string
The operation status. Possible values: "succeeded", "in-progress", "failed".
 Errno  Description
 EVOLUMEDOESNOTEXIST
 EVOLUMEOFFLINE
 EONTAPI_EINVAL
 EONTAPI_EROFS
 EONTAPI_ENOENT
 EVSERVERNOTFOUND
 EAGGRDOESNOTEXIST
 EAGGRNOTONLINE
 EAGGRFAILINGOVER
 EAGGRMISMATCH
 EINVALIDDSID
 EAMBIGUOUS_DSID
 EVOL_RESTRICTED
 EINTERNALERROR

 
qtree-list-iter [top]
Iterate over the list of qtrees in the cluster.
Input Name Range Type Description
desired-attributes qtree-info
optional
Specify the attributes that should be returned in the qtree-info object. If not present, all attributes for which information is available will be returned. If present, only the desired attributes for which information is available will be returned.
max-records [1..100] integer
optional
The maximum number of records to return in this response. Default: 100
query qtree-info
optional
A query that specifies which qtrees need to be returned. A query could be specified on any number of attributes in the qtree-info object. All qtree objects matching this query up to 'max-records' will be returned.
tag string
optional
Specify the tag from the previous iteration. It is usually not specified for the first iteration. For subsequent iterations, copy the value from the 'next-tag' obtained from the previous iteration.
 
Output Name Range Type Description
attributes-list qtree-info[]
optional
The list of attributes of qtree objects.
next-tag string
optional
Tag for the next iteration. Not present when there are no more qtree objects to return.
num-records [0..100] integer
The number of records returned in this response.
 Errno  Description
 EINTERNALERROR

 
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
 EAGGRMISMATCH
 EINVALIDDSID
 EAMBIGUOUS_DSID
 EVOL_RESTRICTED
 EINTERNALERROR
 Vfiler-enabled
 Yes

 
Element definition: qtree-info [top]
Information about a single qtree.
Name Range Type Description
id [0..4994] integer
Id of the qtree (unique within the volume), which is 0 if qtree is the volume itself.
oplocks string
Indicates whether opportunistic locks are enabled on the qtree. Possible values: "enabled", "disabled".
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
vserver string
optional
The vserver in which the volume belongs