Collecting info on active shares, clients, protocols, and authentication on the VNX

I had a comment in one of my Celerra/VNX posts asking for more specific info on listing and counting shares, clients, protocol and authentication information, as well as virus scan information.  I knew the answers to most of those questions however  I’d need to pull out the Celerra documentation from EMC for virus scan info.  I thought it might be more useful to put this information into a new post rather than simply replying to a comment on an old post.

How to list and count shares/exports (by protocol):

You can use the server_export command to list and count how many shares you have.

server_export server_2 -Protocol cifs -list -all:  This command will give you a list of all CIFS Shares across all of your CIFS servers.  It will count a file system twice if it’s shared on more than one CIFS server.

server_export server_2 -Protocol cifs -list -all | grep :  This will give you a list of all CIFS shares on a specific CIFS server

server_export server_2 -Protocol cifs -list -all | grep | wc:  This will give you the number of CIFS shares on a specific CIFS server.  The “wc” command will output three numbers, the first number listed is the number of shares.

server_export server_2 -Protocol nfs -list -all:  This command will give you a list of all NFS exports.  It’s just like the previous commands, you can add “| wc” at the end to get a count.

How to list client connections by OS type:

To obtain information for the number of client connections you have by OS type, you’d have to use the server_cifs audit command.

To get a full list of every active connection by client type, use this command:

server_cifs server_2 -option audit,full | grep “Client(“

The output would look like this:

|||| AUDIT Ctx=0x022a6bdc08, ref=2, W2K Client(10.0.5.161) Port=49863/445
|||| AUDIT Ctx=0x01f18efc08, ref=2, XP Client(10.0.5.42) Port=3890/445
|||| AUDIT Ctx=0x02193a2408, ref=2, W2K Client(10.0.5.61) Port=59027/445
|||| AUDIT Ctx=0x01b89c2808, ref=2, Fedora6 Client(10.0.5.194) Port=17130/445
|||| AUDIT Ctx=0x0203ae3008, ref=2, Fedora6 Client(10.0.5.52) Port=55731/445
...

In this case, if I wanted to count only the number of Fedora6 clients, I’d use the command server_cifs server_2 -option audit,full | grep “Fedora6 Client”.  I could then add “| wc” at the end to get a count.

To do a full audit report:

The command server_cifs server_2 -option audit,full will do a full, detailed audit report and should capture just about anything else you’d need.  Every connection will have a detailed audit included in the report. Based on that output, it would be easy to run the command with a grep statement to pull only the information out that you need to create custom reports.

Below is a subset of what the output looks like from that command:

|||| AUDIT Ctx=0x0177206407, ref=2, W2K8 Client(10.0.0.1) Port=65340/445
||| CIFSSERVER1[DOMAIN] on if=<interface_name>
||| CurrentDC 0x0169fee808=<Domain_Controller>
||| Proto=SMB2.10, Arch=Win2K, RemBufsz=0xffff, LocBufsz=0xffff, popupMsg=1
||| Client GUID=c2de9f99-1945-11e2-a512-005056af0
||| SMB2 credits: Granted=31, Max=500
||| 0 FNN in FNNlist NbUsr=1 NbCnx=1
||| Uid=0x1 NTcred(0x0125fc9408 RC=2 KERBEROS Capa=0x2) 'DOMAIN\Username'
|| Cnxp(0x0230414c08), Name=FileSystem1, cUid=0x1 Tid=0x1, Ref=1, Aborted=0
| readOnly=0, umask=22, opened files/dirs=0
| Absolute path of the share=\Filesystem1
| NTFSExtInfo: shareFS:fsid=49, rc=830, listFS:nb=1 [fsid=49,rc=830]

|||| AUDIT Ctx=0x0210f89007, ref=2, W2K8 Client(10.0.0.1) Port=51607/445
||| CIFSSERVER1[DOMAIN] on <interface_name>
||| CurrentDC 0x01f79aa008=<Domain_Controller>
||| Proto=SMB2.10, Arch=Win2K8, RemBufsz=0xffff, LocBufsz=0xffff, popupMsg=1
||| Client GUID=5b410977-bace-11e1-953b-005056af0
||| SMB2 credits: Granted=31, Max=500
||| 0 FNN in FNNlist NbUsr=1 NbCnx=1
||| Uid=0x1 NTcred(0x01c2367408 RC=2 KERBEROS Capa=0x2) 'DOMAIN\Username'
|| Cnxp(0x0195d2a408), Name=Filesystem2, cUid=0x1 Tid=0x1, Ref=1, Aborted=0
| readOnly=0, umask=22, opened files/dirs=0
| Absolute path of the share=\Filesystem2
| NTFSExtInfo: shareFS:fsid=4214, rc=19, listFS:nb=0

|||| AUDIT Ctx=0x006aae8408, ref=2, XP Client(10.0.0.99) Port=1258/445
 ||| CIFSSERVER1[DOMAIN] on if=<interface_name>
 ||| CurrentDC 0x01f79aa008=<Domain_Controller>
 ||| Proto=NT1, Arch=Win2K, RemBufsz=0xffff, LocBufsz=0xffff, popupMsg=1
 ||| 0 FNN in FNNlist NbUsr=1 NbCnx=1
 ||| Uid=0x3f NTcred(0x01ccebc008 RC=2 KERBEROS Capa=0x2) 'DOMAIN\Username'
 || Cnxp(0x019edd7408), Name=Filesystem8, cUid=0x3f Tid=0x3f, Ref=1, Aborted=0
 | readOnly=0, umask=22, opened files/dirs=3
 | Absolute path of the share=\Filesystem8
 | NTFSExtInfo: shareFS:fsid=35, rc=43, listFS:nb=0
 | Fid=2901, FNN=0x0012d46b40(FREE,0x0000000000,0), FOF=0x0000000000  DIR=\Directory1
 |    Notify commands received:
 |    Event=0x17, wt=1, curSize=0x0, maxSize=0x20, buffer=0x0000000000
 |    Tid=0x3f, Pid=0x2310, Mid=0x3bca, Uid=0x3f, size=0x20
 | Fid=3335, FNN=0x00193baaf0(FREE,0x0000000000,0), FOF=0x0000000000  DIR=\Directory1\Subdirectory1
 |    Notify commands received:
 |    Event=0x17, wt=0, curSize=0x0, maxSize=0x20, buffer=0x0000000000
 |    Tid=0x3f, Pid=0x2310, Mid=0xe200, Uid=0x3f, size=0x20
 | Fid=3683, FNN=0x00290471c0(FREE,0x0000000000,0), FOF=0x0000000000  DIR=\Directory1\Subdirectory1\Subdirectory2
 |    Notify commands received:
 |    Event=0x17, wt=0, curSize=0x0, maxSize=0x20, buffer=0x0000000000
 |    Tid=0x3f, Pid=0x2310, Mid=0x3987, Uid=0x3f, size=0x20
Advertisements

28 thoughts on “Collecting info on active shares, clients, protocols, and authentication on the VNX”

    1. Sure. Here’s a few examples on how to create a CIFS share or an NFS export from the CLI. To create a CIFS Share: server_export server_2 -P cifs -name File_System_Name -option netbios=CIFS_Server_Name /Share_Name. To export an NFS file system: server_export server_2 -P nfs -o root=10.10.10.10:10.10.10.11,rw=10.10.10.100/255.255.248.0 /File_System_Name. Sorry for the late reply, I haven’t checked my blog for a while.

  1. Is there a cli command to show what file-system might be utilizing the most i/o on a celerra. (for instance, if you see that the data mover i/o is at 10000 i/o ps, can you see what is clobering the data mover?)

    1. Try server_stats server_2 -table fsvol -interval 10 -count 6. You can of course change the interval (how long it will collect data) and the count (how many times it runs the specified interval) to suit your needs. It will show you performance info for each file system.

  2. is there a way to show capacity used by a user, group, department from the CLI? If I want to see how much storage a specific user or department is using?

    1. I haven’t attempted to report on capacity by user, group, or department and I don’t know of any easy way to do that. I do department reporting manually. Your best bet would be to manually categorize your file systems by department and run nas_fs -size filesystem for each file system, which will give you the total MB, available MB, and used MB. The output could then be pasted into Excel and added up. If you’re good with shell scripting, you could output to a csv file with just the file system name and the used MB with awk. I have lots of examples elsewhere in this blog on how to do something like that.

  3. I need to know the space allocated to a CIFS share and how much space is being used or is available in the share. How do I go about getting this information?

    1. To get info on the total, available, and used space on a CIFS share use the nas_fs command. Below is the command syntax and what the output looks like.

      [nasadmin@celerra ~]$ nas_fs -info -size [filesystem_name] | grep size
      size = total = 302512 avail = 41180 used = 261333 ( 86% ) (sizes in MB) ( blockcount = 629145600 )
      volume: total = 307200 (sizes in MB) ( blockcount = 629145600 ) avail = 41179 used = 266021 ( 87% )

      1. Thank you for your quick reply to my question. I have a few file systems that hold more than 1 CIFS share. Is there a way to get disk information off of each share or am I limited to reporting on the file system?

        1. Yes, there is a way to do that. I have a script that I use to report on folder sizes that are on a single file system. I’ll create a new blog post about it today.

    1. It doesn’t look like there would be an easy way to report on active clients to the specific file system, however you can view which file systems each active client is connected to pretty easily. Grep for Uid with the server_cifs server_2 -option audit,full command, and it will show each active user account with a list of their connections below the username.

  4. Hi,

    Recently we migrated shares from celerra to vnx. One of the user came to us statint that he was shares were fine in Linux but they were not able to connect via windows. Can you please tell me as to how to check this and fix it.

    thanks.

    1. 1. CIFS Service. Check and make sure the CIFS Service is running: server_cifs server_2 -protocol CIFS -option start
      2. DNS. Check and make sure that your DNS server entries on the Celerra are correct, that you’re configured to point to at least two, and that they are up and running with the DNS Service running.
      3. NTP. Make sure your NTP server entry is correct on the Celerra, and that the IP is reachable on the network and is actively providing NTP services.
      4. User Mapping. Review your configuration.
      5. Default Gateway. Double check your default gateway in the Celerra’s routing table. Get the network team involved if you’re not sure.
      6. Interfaces. Make sure the interfaces are physically connected and properly configured.
      7. Speed/Duplex. Make sure the speed and duplex settings on the Celerra match those of the switch port that the interfaces are plugged in to.
      8. VLAN. Double check your VLAN settings on the interfaces, make sure it matches what is configured on the connected switch.
      9. Make sure the file system is exported for both CIFS and NFS.

        1. Great, glad it’s fixed. Sorry it took so long to reply to your post. Because of the Christmas holiday I didn’t check my blog or my email for several weeks. If you’d like to reply with what the problem was and what you did to fix it that could be helpful to others that pull up this blog post with a web search.

        2. Yes, certainly.. the issue was that after migration from celerra to vnx few users were unable to access cifs shares… it was because of the domain name mismatch which was to be corrected and the cifs shares were accessible…

          thanks

  5. Does the server_audit command look only at the point in time that you run it? Is there a way to see the peak number or all unique number of NFS clients for a 24 hour period?

    1. The audit command shows what is happening at that exact moment in time. If you wanted to review a 24 hour period, you could to script the command to run at a certain interval and append the output to a log file. Create a blank log file like nfs_log.txt, create a shell script and add “server_export server_2 -Protocol nfs -list -all | wc >> /path/to/nfs_log.txt”, then use cron to run it how ever often you’d like. You could also append the current time & date to the log each time it runs. Add “TODAY=$(date)” at the top, then another line “echo $TODAY >> /path/to/nfs_log.txt”.

      1. I suppose my question is more related to the below command, as I care more about the number of clients connected, than the number of exports:

        server_cifs server_2 -option audit,full | grep “Client(“

        I am interested in NFS clients, would the server_cifs command be able to report on those? There doesn’t appear to be a similar command for server_nfs for all clients, only NFS v4

        server_nfs server_2 -v4 -client -list

        1. Use the Server_netstat command to list the hosts that are connected to the NFS shares. That’s the only way I know how to do it, server_cifs and server_nfs don’t have any options for it.

          [nasadmin@celerra01 ~]$ server_netstat server_2 | grep nfs
          tcp 10.1.1.3.nfs 10.1.126.100.738 ESTABLISHED
          tcp 10.1.1.3.nfs 10.1.126.100.747 ESTABLISHED
          tcp 10.1.1.3.nfs 10.1.168.100.706 ESTABLISHED

  6. Hello Admin,

    Can you pls provide any info as to how to check user mapping settings for celerra and vnx?

    thanks.

Leave a Reply