logo

Manual Pages


Table of Contents

NAME

qtree - create and manage qtrees

SYNOPSIS

qtree

qtree create [ name ]

qtree security [ name [ unix | ntfs | mixed ] ]

qtree oplocks [ name [ enable | disable ] ]

DESCRIPTION

The qtree command creates qtrees and specifies attributes for qtrees.

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:

unix The user's UID and GID, and the UNIX-style permission bits of the file or directory determine user access. The filer uses the same method for determining access for both NFS and CIFS requests. If you change the security style of a qtree or a volume from ntfs to unix, the filer disregards the Windows NT permissions that were established when the qtree or volume used the ntfs security style.

ntfs For CIFS requests, Windows NT permissions determine user access. For NFS requests, the filer generates and stores a set of UNIXstyle permission bits that are at least as restrictive as the Windows NT permissions. The filer grants NFS access only if the UNIXstyle permission bits allow the user access.

If you change the security style of a qtree or a volume from unix to ntfs, files created before the change do not have Windows NT permissions. For these files, the filer uses only the UNIX-style permission bits to determine access.

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.

EXAMPLES

The following example sets the security style of a qtree named marketing in the root volume to ntfs:

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

SEE ALSO

na_options(1), na_quota(1), na_quotas(5)


Table of Contents