Netapp - How to move a data from a non-qtree folder to a qtree for CIFS

Published:
Following is a common enough scenario :

We would like to set a quota on a shared folder. Let's say you have a CIFS share for a folder that is not a qtree, unfortunately that will also mean that you cannot impose a Quota on it.

So, how to resolve this ?

To impose a quota, you will have to move the share to a qtree. You can either create a qtree under another volume or the same volume.

The following article explains both ways to achieve creating the qtree (but not setting up the quota).

For our example, lets assume that the source folder /vol/volume1/folder1 on filer1 is shared as \\filer1\folder1$.

First step is we will need to remove the existing share. Then, rename the source folder to folder1.old (you may leave the folder with the existing name if you do not want to create a qtree with the same name or if the qtree will reside under another volume).

Now create a qtree called 'folder1' under volume 'volume1'. (or a different volume 'volume2')

NOTE: Please be careful with the case of the qtree name and the command as it is case sensitive.

To copy all the data from the source folder to the destination qtree we can use the 'ndmpcopy'. This command also copies the ACLs for the data.

The Syntax for the command is :
ndmpcopy Source_location Destination_location

Open in new window

For our example, use the following commands to copy the data along with the ACLs to the newly created qtree

1. if the source folder has been renamed
ndmpcopy /vol/volume1/folder1.old /vol/volume1/folder1

Open in new window

where volume1 is the name of the volume under which the source folder and the new qtree resides.

2. If the source folder resides on a different volume than the new qtree
ndmpcopy /vol/volume1/folder1 /vol/volume2/folder1

Open in new window

where volume1 is the volume under which the source folder resides and volume2 is the volume under which the new qtree has been created

After the ndmpcopy is complete, share the newly created qtree. Ndmpcopy may take time to complete depending on the size of the data to be copied.

While we werent going to discuss quota's as such, it is worthwhile noting that user and group quotas do not apply to the root and Windows Administrator accounts but tree quotas will.

To read up more about the ndmpcopy command, see the manual : https://library.netapp.com/ecmdocs/ECMM1277788/html/cmdref/man1/na_ndmpcopy.1.htm 

NOTE: to read documentation from the NetApp site you may need to register (you will most certainly need to be registered to gain access to the above documentation).
1
8,032 Views

Comments (1)

Eprs_AdminSystem Architect

Commented:
works very well :-)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.