Monday, June 18, 2018

Qtrees


Overview
--------

Basic Details:

- partition volumes into smaller segments
- properties are: quotas, backups, security style, CIFS oplocks settings
- can be used in creating CIFS shares
- you can create several qtrees inside a volume and each of them can have
  different quotas

Properties:

Opportunistic and Lease oplocks

  Traditional oplocks (opportunistic locks) and lease oplocks enable a CIFS
client in certain file-sharing scenarios to perform client-side caching of
read-ahead, write-behind, and lock information

  A client can then read from or write to a file without regularly reminding the
server that it needs access to the file in question. This improves performance
by reducing network traffic.

Commands
--------

Displaying
# quick view of status
qtree status [-i|-v]

# displays statistics
qtree stats
** stats are reset upon system reboot
** stats are reset when volume containing it is brought online
** stats are reset when you trigger this command: qtree stats -z

Creating
# creates a qtree under a specified volume
qtree create /vol// -m
  ** mode is permission
  ** you can see default mode under wafl.default_qtree_mode option

# creates a qtree under the root volume (/vol/vol0)
qtree create

Modifying
# Enabling/Disabling for entire storage
cifs.oplocks.enable on
cifs.oplocks.enable off

# Enabling/Disabling for qtrees qtree oplocks /vol/vol2/proj enable
qtree oplocks /vol/vol1/qtree enable
qtree oplocks /vol/vol1/qtree disable

Renaming
1. volume that contains the qtree must be available
  on a UNIX client: mount filer:/vol/my_vol/ /mnt
  on a Windows client: map the qtree into windows explorer

2. find the qtree and rename it
  on a UNIX client: mv /mnt/qtree_old /mnt/qtree_new
  on a Windows client: rename using windows explorer
** you can rename qtree depending on the qtree permissions

Deleting
# basic
qtree delete /path/to/qtree

# force (if for some reason directory is not emtpy)
qtree -f delete /path/to/qtree
  * you might need to go to "priv set advanced"

Tutorials
---------

Actual commands on CIFS creation
qtree create /vol/data_share_vol/data_share_qtree
qtree security /vol/data_share_vol/data_share_qtree ntfs
qtree oplocks /vol/data_share_vol/data_share_qtree enable
cifs shares -add data$ /vol/data_share_vol/data_share_qtree


No comments:

Post a Comment