Convert a directory to a qtree using a UNIX client
To convert a directory to a qtree in UNIX, you rename the directory, create a qtree on the storage system, and move the directory's contents to the qtree.
-
Open a UNIX client window.
-
Use the
mvcommand to rename the directory.client: mv /n/user1/vol1/dir1 /n/user1/vol1/olddir
-
From the storage system, use the
volume qtree createcommand to create a qtree with the original name.system1: volume qtree create /n/user1/vol1/dir1
Learn more about
volume qtree createin the ONTAP command reference. -
From the client, use the
mvcommand to move the contents of the old directory into the qtree.The more subdirectories contained in a directory that you are moving, the longer the move operation will take.
client: mv /n/user1/vol1/olddir/* /n/user1/vol1/dir1
-
Use the
rmdircommand to delete the old, now-empty directory.client: rmdir /n/user1/vol1/olddir
Depending on how your UNIX client implements the mv command, file ownership and permissions might not be preserved. If this occurs, update file owners and permissions to their previous values.
Learn more about the commands described in this procedure in the ONTAP command reference.