New-SmbGlobalMapping Behavior with NetApp CIFS Share

Bradford, Jamie F 101 Reputation points
2020-09-16T00:04:04.707+00:00

A customer of mine is trying to use the New-SmbGlobalMapping cmdlet to map a drive letter to an SMB2 share (a CIFS-enabled NFS volume) on a NetApp filer. The share mapping works fine, but in the share are two folders that are actually NFS links. He can CD to the folders, but when he does a Get-ChildItem, he gets the following:

Get-ChildItem: An unexpected network error occurred.
At line:1 char:1

  • dir
  • ~~~
  • CategoryInfo : ReadError: (M:\users:String) [Get-ChildItem], IOException
  • FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

I can map the drive letter with NET USE, Explorer, or New-SmbMapping, and the issue does not occur. Widelinks are enabled on the NetApp. This feels like a problem with New-SmbGlobalMapping and how the share is mapped.

First, where can I find more information about the *-SmbGlobalMapping cmdlets, as the SmbShare documentation does not include reference to them.

Second, I suspect that there is something different about how this cmdlet maps the share, and that something may need to change on the filer side. But I don't know what's different or what might need to change.

Any insight on these cmdlets is greatly appreciated!

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Bradford, Jamie F 101 Reputation points
    2020-09-16T22:02:39.383+00:00

    After some further troubleshooting, I found the Microsoft article on Persistent Storage in Containers, which notes that "SMB global mapping does not support DFS, DFSN, DFSR shares in Windows Server version 1709." Based on testing on both Windows 10 clients (1909) and Server 2019 LTSC (1809), this was not resolved in subsequent releases.

    This applies to the NetApp filer for CIFS-enabled NFS volumes when Widelinks are enabled, as a wideline on the NetApp is really a server DFS link, which these cmdlets don't support. At this point, the only way around this that I can find is to create drive mappings for each such link.

    While there's not much documentation out there, the intent of the SmbGlobalMapping cmdlets is to provide a mechanism to create system-wide drive mappings with authentication that can be used across all containers and sessions on the server. The SmbMapping cmdlets only affect the current user session or user, if persistence is specified.

    I'll report the documentation gap as requested.

    Jamie

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2020-09-16T06:59:26.27+00:00

    Hi,
    Please report the issue of missing documentation here
    https://github.com/MicrosoftDocs/windows-powershell-docs/issues

    Since New-SmbMapping works well you‘d use it instead for now.

    Best Regards,
    Ian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.