As always download the newest version of the blueprint breakdown from here.
This section covers Qtrees. Qtrees are another logical segregation of a volume used to hold further information within. Think of them as directories inside a volume with files in them. They are integral components of products like SnapMirror and necessary components of SnapVault. They can have quotas and different backup and security styles than their volume counterparts. You can have 4994 qtrees per volume, per NetApp system.
We’re going to perform the following labs in both the CLI and System Manager where the capabilities exist to do in both:
- Create Qtree
- Copy Qtree
- Rename Qtree
- Move Qtree
- Change Qtree security
- Delete Qtree
Create Qtree – CLI
Creating a qtree is a very simple process. You first need a volume to put the qtree in. From ONTAP1, we’ll use the test_vol Volume and add a qtree named test_qtree.
qtree create /vol/test_vol/test_qtree qtree status
Creating a qtree from System Manager is easy as well but does require a few more steps. Log into System Manager and the Data ONTAP instance. Expand the device, click on Storage and click on Qtrees
Copying a qtree is also pretty easy but is done in different ways. Qtrees can’t natively be copied using a copy command, you can only copy them using either Qtree SnapMirror or by using NDMPCOPY. Qtree SnapMirror is covered in a later topic so we’ll just use NDMPCOPY. NDMPCOPY will require downtime while the copy is performed. Qtree SnapMirror can be used to sync the qtree and then cut over to it. It is the much more elegant solution for qtrees with a large amount of data in them.
ndmpcopy /vol/test_vol/test_qtree /vol/test_vol2/test_qtree qtree status
You cannot copy a qtree from within System Manager
Rename Qtree – CLI
Renaming a qtree is not that hard either. However, you can only do it from within the advanced shell in Data ONTAP, priv set advanced.
priv set advanced qtree rename /vol/test_vol/test_qtree /vol/test_qtree_new qtree status
You cannot rename a qtree from within System Manager
Move Qtree – CLI
Moving a qtree is no different than copying a qtree. The same rules apply. You can only use Qtree SnapMirror or NDMPCOPY. After you’re done, you simply delete the old qtree location. This obviously means that you’ll need to ensure that you have enough room to keep both copies on the filer until you can delete the old one. There’s no reason to show how to copy it, I already did that above. Below we’ll see how to delete a qtree which would complete a ‘move’ process.
Move Qtree – System Manager
You cannot move a qtree from within System Manager
Change Qtree Security – CLI
By default, qtrees take on the security of the volume they’re in. The default volume security style is determined by the wafl.default_security style option setting. By default this is UNIX which means all volumes created and subsequent qtrees will be UNIX security by default. This can be overridden to provide NTFS, UNIX or MIXED access to a qtree. Below we’ll change the qtree security style to NTFS.
qtree status qtree security /vol/test_vol/test_qtree ntfs qtree status
Changing the security of a qtree from within System Manager is one of the only things you can actually do to a qtree from System Manager once it’s created. Log into System Manager and the Data ONTAP instance. Expand the device, click on Storage and click on Qtrees. Since we changed it to NTFS before, we’ll change it to Mixed now.
Much the same with renaming a qtree, you can only delete a qtree from the CLI from the advanced shell.
priv set advanced qtree delete /vol/test_vol/test_qtree
Log into System Manager and the Data ONTAP instance. Expand the device, click on Storage and click on Qtrees. Select the test_qtree and click on the Delete button. Check the OK to delete the Qtree(s) option and click Delete.