Pages

Wednesday, July 25, 2012

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

Following is the scenario

Lets say you have a CIFS share for a folder that is not a qtree, so you cannot impose a Quota on it. 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 this.

How to resolve this?

The source folder /vol/volume1/folder1 on filer1 is shared as \\filer1\folder1$. First remove the existing share.
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

Use the following commands to copy the data with the ACLs to the newly created qtree

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

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

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.

No comments:

Post a Comment