Network and Storage Protocols

How to delete a Qtree from a Vfiler?


Please help. Why can't  I delete a qtree owned by vfiler1?

Error Message -- "/vol/vol1/qtree1 is not part of vfiler vfiler1."

filer1> vfiler  remove  vfiler1 /vol/vol1/qtree1
/vol/vol1/qtree1 is not part of vfiler vfiler1.

filer1> qtree status -v  vol1
Volume   Tree     Style Oplocks  Status    Owning vfiler
-------- -------- ----- -------- --------- -------------
vol1    qtree1       ntfs  enabled  normal       vfiler1

Since vfiler1 is the owner of  qtree1,  I should be able to delete it using vfiler remove.  I have no shares on qtree.



The remove command removes a resource from the vfiler, but does not delete the resource.  The volume or qtree goes back to vfiler0, the physical filer.  However, in this case, I suspect the vfiler owns the volume... vfiler status -a will show that... if so, then you can't remove a qtree if the volume is already assigned.  To remove the qtree, do it from a cifs or nfs client and delete the directory (qtree).  There is also an advanced mode on the filer to do this but that would be best with support on the phone since we can't talk about unsupported features...but ok to say there is a way to do it (most netapp se's know the method if an empty qtee to delete from the filer).

One possible example could be

vfiler0 owns vol/vol0/qtree0
vfiler1 owns vol/vol1/qtree1
* vfiler0 owns qtree0 and can delete it
* vfiler0 does not own qtree1 and cannot delete it
* vfiler1 owns qtree1 and can delete it
* vfiler1 does not own qtree0 and cannot delete it

When you add  /vol/vol0/qtree0' to filer1, vfiler0 no longer owns
qtree0 and should not be able to delete it. vfiler1 is also not able
to delete qtree0 because the qtree resides in vol0, which is not
accessible by vfiler1 and vfiler0 owns it.



I got stuck on this today and just thought i'd add what I did to remove the qtree from a vfiler

Enable cifs on the vfiler, browse to \\vfiler_ip_or_name\c$\vol\volume_containing_qtree

In here just delete the qtree folder.

If you have a lun inside the qtree you may need to use the vfiler cli to destroy the lun first.



priv set advanced; vfiler run <<vfiler_name>> qtree delete  [-f] <path>


Hope, This will helps for your question...

You can't delete the qtree directly from the non-default filer, so require to remove the qtree from non-default filer to default vfiler (vfiler0) then remove. See below KB.




I just had to do this and got the answer from one of the posts.

To delete a qtree from a vfiler (because there is no priv cmd)

Create a share from the root (I normally make them admin\hidden by adding a $ to the end e.g.  cifs shares -add somename$ /vol/somevol

From a client browse to \\somefiler\somename$

This will list all the qtrees in the volume

select and qtree and press delete

Hope that helps.


Hey Tom,

Your work around worked perfectly - Cheers!!