Microsoft Virtualization Discussions

PowerShell - invoke-NaNDMPCopy Failing

chriszurich
4,975 Views

I'm attempting to script moving home directories into Qtree's using invoke-NDMPcopy and have run into some problems. 

Host OS Version: Win2k8 64-bit

PowerShell ToolKit Version: 2.2

NetApp DataONTAP 8.1.1 (Run from within a vfiler)

All commands are being executed within a vfiler where I've been able to successfully run ndmpcopy from the command line with no errors.  When running it from within Powershell it tells me that "Controller x.x.x.x (vfiler ip) does not support NDMP version 4". Attempts to re-run the command specifying version 3 yield the same result. 

Execution Syntax: invoke-naNDMPCopy <source ip> /vol/source volume/source folder/ <dest. ip> /vol/dest volume/dest qtree/ -SrcCredential $PSCred -DstCredential $PSCred -Level 0

1 ACCEPTED SOLUTION

chriszurich
4,975 Views

Thanks for the reply beam.  I actually got it to work and found that I was running into a syntax issue more then anything else.  The was able to resolve my issue by simply removing the credential details from my execution string. 

invoke-naNDMPCopy  -l 0 /vol/source volume/source folder/  /vol/dest volume/dest qtree/

This worked for moving folders into qtrees on a volume found on the same filer. 

View solution in original post

5 REPLIES 5

beam
4,975 Views

What is the NDMP max version for the vfiler?  You can find out using the CLI command "ndmpd version".

If the max version is 3 or 4, you can turn on debug logging which will capture the NDMP response from the vfiler when Invoke-NaNdmpCopy establishes a connection.  If you're using Toolkit 2.2, "Set-NaToolkitConfiguration DEBUG" will enable debug logging (you'll need to restart PowerShell for the change to take effect).  "Set-NaToolkitConfiguration OFF" will turn off debug logging.  After you've enabled debug logging and run Invoke-NaNdmpCopy, you should see a message which hopefully will provide some clues as to why the command is failing.  It should look similar to this:

2012-12-19 13:34:35,424 DEBUG DataONTAP.PowerShell.SDK.Cmdlets.Ndmp.NdmpConnection - [Request] (NO_ERR): NOTIFY_CONNECTE

D Connection opened:  Version=4, ReasonCode=0, ReasonString=Connection successful.

-Steven

sharu
4,975 Views

HI

I get the below error for Invoke-NaNdmpCopy command.

PS C:\work\e2e\src\main\resources\posh> $secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force

PS C:\work\e2e\src\main\resources\posh> $mycreds = New-Object System.Management.Automation.PSCredential ("root", $secpasswd)

 

PS C:\work\e2e\src\main\resources\posh> Invoke-NaNdmpCopy <src_ip> /vol/vol123 <dst_ip> /vol/vol345/qtree345  -SrcCredential $mycreds -DstCredential $mycreds

Invoke-NaNdmpCopy : Exception from ndmp message CONNECT_CLIENT_AUTH: Could not authenticate connection.  Error ILLEGAL_ARGS_ERR.

At line:1 char:1

+ Invoke-NaNdmpCopy <src_ip> /vol/vol123 <dst_ip> /vol/vol345/qtree345  - ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (:) [Invoke-NaNdmpCopy], NdmpMessageException

    + FullyQualifiedErrorId : Ndmp connection error,DataONTAP.PowerShell.SDK.Cmdlets.Ndmp.InvokeNaNdmpCopy

Please let me know if there is something wrong here.

-Sharu

beam
4,975 Views

Hi Sharu,

Try using the -SrcAuthType and -DstAuthType parameters.  The default value is "none"--you probably need to specify either "text" or "md5" for the connection to authenticate.

The supported AuthType values are stored in the ndmpd.authtype option:

PS C:\> Get-NaOption ndmpd.authtype

ClusterConstraint                       Name                                    Value

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

none                                    ndmpd.authtype                          challenge

A value of 'challenge' means you should use the md5 AuthType.

-Steven

BrendonHiggins
4,975 Views

I have been having problems with this powershell today and the posted work around above did not help, as I have a remote system.  To resolve the issue

"Invoke-NaNdmpCopy : Exception from ndmp message CONNECT_CLIENT_AUTH: Could not authenticate connection.  Error ILLEGAL_ARGS_ERR"

I had to create version 4 NDMP password!  The "ndmpd password a_name" was not what the cmdlet was expecting.  Strange but true.

ndmpd password a_name version 4

password m9XXbXsXg6XX8qfX

Hope it helps

Bren

chriszurich
4,976 Views

Thanks for the reply beam.  I actually got it to work and found that I was running into a syntax issue more then anything else.  The was able to resolve my issue by simply removing the credential details from my execution string. 

invoke-naNDMPCopy  -l 0 /vol/source volume/source folder/  /vol/dest volume/dest qtree/

This worked for moving folders into qtrees on a volume found on the same filer. 

Public