qtree create [ name ]
qtree security [ name [ unix | ntfs | mixed ] ]
qtree oplocks [ name [ enable | disable ] ]
A qtree can be an entire volume or a subset of a volume. It is similar to a partition in that you cannot move files into or out of a qtree. There are, however, two differences between a qtree and a partition:
A qtree is more flexible than a partition because you can change the size of a qtree at any time.
A qtree enables you to apply attributes such as oplocks and security style to a subset of files and directories rather than to an entire volume.
If there are files and directories in a volume that do not belong to any qtrees you create, the filer considers them to be in qtree 0. Qtree 0 can take on the same types of attributes as any other qtrees.
You can use any qtree command whether or not quotas are enabled on your filer.
The qtree command without any arguments displays the attributes of all quota trees on the filer.
The qtree create command creates a qtree. It is equivalent to the quota qtree command. If name does not begin with a slash (/), the qtree is created in the root volume. To create a qtree in a particular volume, specify name in this format: /vol/vol_name/qtree_name.
A qtree can be created only in the root directory of a volume. By default, a qtree has the same security style as the root directory of the volume and oplocks are enabled. The root directory of a volume, by default, uses the unix security style.
A qtree does not have any restrictions on disk space or the number of files. To impose these restrictions on a qtree, edit the /etc/quotas file. Refer to the na_quotas(5) man page for more information about the file format. To make the changes to the /etc/quotas file go into effect, use the quota command. Refer to the na_quota(1) man page for more information about the quota command.
If you enter the qtree create command without arguments, the command displays all existing qtrees and their attributes.
To delete a qtree, remove it from a client as you would any directory. You can create up to 254 qtrees on a filer.
The qtree security command changes the security style for files and directories. Security style means the method the filer uses to determine whether a user has access to a file. If name is the path name to a qtree, the security style applies to the files and directories in the specified qtree. The path name to a qtree does not need to end with a slash. If name is a path name to a volume, the security style applies to those directories and files in qtree 0. Any new qtree you create inherits the security style from qtree 0 by default. The path name to a volume must end with a slash.
The security style can be one of the following values:
mixed Some files in the qtree or volume have the unix security style, and some have the ntfs security style. A file's security style depends on whether the permission was last set from CIFS or NFS. For example, if a file currently uses the unix security style and a CIFS user sends a set-ACL request to the file, the file's security style is changed to ntfs. If a file currently uses the ntfs style and an NFS user sends a set-permission request to the file, the file's security style is changed to unix.
If you do not specify unix, ntfs, or mixed in the qtree security command, the security style for name is displayed. If you omit name, the security styles for all qtrees on the filer are displayed.
The qtree oplocks command enables or disables oplocks for files and directories in a qtree or in a volume. If name is the path name to a qtree, the attribute applies to files and directories in the specified qtree. The path name to a quota tree does not need to end with a slash. If name is the path name to a volume, the attribute applies to those files and directories in qtree 0. The path name to a volume must end with a slash.
If the cifs.oplocks.enable option is off, oplocks are not sent even if you enable the oplocks on a per-quota-tree basis with the qtree oplocks command. The cifs.oplocks.enable option is enabled by default.
If you do not specify enable or disable in the qtree oplocks command, the oplock attribute for name is displayed. If you omit name, the oplock attributes for all quota trees on the filer are displayed.
toaster> qtree security marketing ntfs
The following example sets the security style of a qtree named engineering in the vol1 volume to ntfs:
toaster> qtree security /vol/vol1/engr ntfs
The following example sets the security style of the root volume to unix:
toaster> qtree security / unix
The following example sets the security style of the vol1 volume to unix: toaster> qtree security /vol/vol1/ unix
The following example disables oplocks for the engr qtree:
toaster> qtree oplocks /vol/vol1/engr disable
The following example enables oplocks for the vol1 volume:
toaster> qtree oplocks /vol/vol1/ disable
The following example displays the security and oplocks attributes for all volumes and qtrees on the filer:
toaster> qtree
Volume Tree Style Oplocks -------- -------- ----- -------- vol0 unix enabled vol0 marketing ntfs enabled vol1 unix enabled vol1 engr ntfs disabled