Subscribe
Highlighted

Powershell SnapMirror

Hi, I have done a snapmirror between clusters, and feel fairly comfortable with the process, what i was wanting to know was how do i find out the status of a snapmirror in progress, how much data has been moved and how long the process has been running. I know via command line how to do it, but could anyone show me how to do it in powershell. 

 

we are currently on a fas8020 running 8.3.1. Any help most appreciated. 

Re: Powershell SnapMirror

Have you looked at the Get-NcSnapMirror cmdlet?  I believe that if you speciffy only one relationship it will return all of the attributes for that relationship.  I do not have a working lab to test that, but it should be quick to check.  The Get-NcSnapMirrorHistory may also have the information that you are looking for, but I am not sure if it will return it for a running update.

Re: Powershell SnapMirror

Hi Geringer, though the command is useful it doesnt provide the detail that i need. I can see how this command can be used to monitor mirror history of comms. I will definately be using this in the future in my toolkit.

 

Re: Powershell SnapMirror

I think something like this will work to return the amount of data transferred and time elapsed.  I don't have any active snapmirror relationships to test with, so I can't say for sure...

 

Get-NcSnapmirror -Query @{ RelationshipStatus = "transferring" } | Select-Object SourceLocation,DestinationLocation, `
    @{'N'='GB Transferred'; 'E'={ [Math]::Round($snapmirror.TotalTransferBytes / 1gb, 2) } }, `
    @{'N'='Min Elapsed'; 'E'={ [Math]::Round((New-TimeSpan -Seconds $snapmirror.TotalTransferTimeSecs).Minutes, 2) } }

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Powershell SnapMirror

Hi, Thanks for shwoing me this, it seems as if this could be it. I will set up some data to transfer and then gt back to you with some results. Many thanks again.