I am trying to find out where is my cifs share "a1" located.
I know for sure it is under volume vol3. However, when I run qtree status vol3, I don't see "a1" tree is listed there. Could it be possible that the share is not in a qtree? then where is the share located? Thanks for your help!
It looks to me like the share named "a1_vol3$" maps to vol3. "a1" is only in the name of the share, not the volume/qtree. So when you do a qtree status, you'll see the volume (vol3) represented, but again "a1" is only a designation for the share name. As to your implication that shares must/should be in a qtree, this is simply not the case.
Now if a1 is not a volume, nor a qtree, then how has this share a1 been mapped to the volume vol3, or how was it created? Was it created on a Window server as a folder, and then shown on the filer as "a1_vol3$"?
A share is created by "cifs shares -add <sharename> <path> [<options>]". The name of the share is completely independant from the name of the path. Personally, I like to name my share after the volume/qtree/directory/whatever, just to keep my sanity, but not everyone does (or can). So in this case, "cifs shares -add a1_vol3$ /vol/vol3" would have created this share.
There is a way to create shares from windows servers if they have the proper permissions, but I've not had any real experience there, so I can't say for sure.
Definitely, you have helped me a lot on this question! You could tell that I am new to CIFS SHARES.
I have one more last question.
As I understand so far, in addition to volumes or qtrees, a share could also be created by using the command you provided "cifs share -add..". My question is, are there any commands to list all shares under a volume, including all qtrees shares or non-qtree shares? Otherwise, I would not know what and how many shares under volumes...
You say "...in addition to volumes or qtrees, a share could also be created by..." I'm not sure what you mean by that first bit. CIFS shares are not automatically created when a volume or qtree is created (unlike NFS exports, if nfs.export.auto-update is set, an export will be created for new volumes (but not qtrees)). The only ways to create a CIFS share on the filer is with that command, with one of the NetApp management tools, or as I mentioned earlier through the windows server side.
To answer your question, there is not a command to do what you're asking. "cifs shares" will list all the shares and the volume/path they point to, so you could do some sorting on that output, but it won't tell you about qtrees. You could run "qtree status" and match between the two to figure it out.