Microsoft Virtualization Discussions

perform a SVM failover using powershell

tchuise92
6,996 Views

Good Morning everyone, 

I am looking forward to configure a failover to an SVM-DR using powershell, I would like to know if somebody did it in the past even with python.

Thank you

4 REPLIES 4

asulliva
6,983 Views

Generally speaking, doing SVM failover is just like breaking any other SnapMirror relationship...

 

  1. Abort any active SnapMirrors (Invoke-NcSnapmirrorAbort)
  2. Break the relationship (Invoke-NcSnapmirrorBreak)
  3. Activate the DR site (Start-NcVserver)

You'll want to add some checks and validations, but more or less, just follow the PSTK equivalent of the commands in the documentation.

 

Andrew

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

tchuise92
5,658 Views

Thank you for you insight, I end up using WFA but it seems like the pack needs some adjustment to fit in my environment. 

JGPSHNTAP
4,502 Views

We are finally getting around to doing this and would like to do with in powershell / WFA, but I have a question..

 

It seems when I try to break the svm-dr relationship for example from powershell

 

get-ncsnapmirror -vserver testvserver | ? {$_.destinationlocation -eq "testvserver:"} | invoke-ncsnapmirrorbreak  it comes back with the following errors

 

Invoke-NcSnapmirrorBreak : Cannot bind argument to parameter 'DestinationVolume' because it is null.

 

with SVM you have to break the top relationship only so it's testverserver:  (notice with 🙂

 

I'm sure it's something simple, If anyone can assist that would be great.

JGPSHNTAP
4,499 Views

And andy what i'm noticing is if you have SVM-DR the pipeline command doens't work

 

so for example

 

get-ncsnapmirror -vserver testvserver | invoke-ncsnapmirrorupdate  or any pipeline.

 

Perhaps this is a bug

 

Sorry to latch onto an old thread.

 

Public