Network and Storage Protocols

Where is this CIFS share located?

CITMAGIC123
11,938 Views

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!

>cifs shares a1_vol3$

Name         Mount Point                       Description

----         -----------                       -----------

a1_vol3$ /vol/vol3

8 REPLIES 8

billshaffer
11,938 Views

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.

Or have I misunderstood your question?

Bill

CITMAGIC123
11,938 Views

Hi Bill,

got your points. Thanks!

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$"?

billshaffer
11,938 Views

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.

Does that help?

Bill

CITMAGIC123
11,938 Views

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...

Thank you very much!

billshaffer
11,938 Views

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.

Bill

ChanceBingen
11,938 Views

You could do a non-interactive SSH. Plink the cifs shares command to the filer and then pipe the output through findstr (windows native version of grep).

netappmagic
11,938 Views

Hi bingen,

Would you please explore your idea more in details? It'd better to show me an example. Thank you!

ChanceBingen
11,938 Views

Here's an example from one of my lab filers (edited for content, obviously).

C:\Program Files (x86)\PuTTY>plink <username>@<filername> -pw <password> "cifs shares" | findstr web

web          /vol/web

So you can see, it only printed lines that had the string "web" in it.

Now, a much better way to do this is with the Data ONTAP PowerShell Toolkit, using very basic PowerShell skills you can get the same results without having to leverage PLink.

PS C:\Users\myuser> Get-NaCifsShare | Where {$_.MountPoint -eq "/vol/web"}

MountPoint                                    ShareName                 Description

----------                                    ---------                 -----------

/vol/web                                      web

Public