The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Microsoft Virtualization Discussions

script to restrict and initialize snapmirror

JSHACHER11

I am trying to create a script to restrict and initialize snapmirror - it is only for learning purpose so I am only using one filer

The relationships should be

vol1 -> vol3

vol2 -> vol4

I was trying this, but got lost:

(Set-NaVol -Restricted is asking for volume name)

+++++++++++++++++++++++++++++++

Import-Module dataontap

$filer = Read-Host "Enter the filer name"

$user = Read-Host "Enter the username"

Connect-NaController $filer -Credential $user

$source1 = vol1

$source2 = vol2

$dest1 = vol3

$dest2 = vol4

$dests = ($dest1,$dest2)

$sources = ($source1,$source2)

foreach ($dest in $dests)

{

Set-NaVol -Restricted

}

Invoke-NaSnapmirrorInitialize $dest1 $source1

Invoke-NaSnapmirrorInitialize $dest2 $source2

++++++++++++++++++++++++++++++++++

how is that done right?

Cheers

1 ACCEPTED SOLUTION

JSHACHER11

Got it!

++++++++++++++++++++++++++++

Import-Module dataontap

$filer = Read-Host "Enter the filer name"

$user = Read-Host "Enter the username"

Connect-NaController $filer -Credential $user

$source1 = Get-NaVol vol1

$source2 = Get-NaVol vol2

$dest1 = Get-NaVol vol3

$dest2 = Get-NaVol vol4

$dests = $dest1,$dest2

$sources = $source1,$source2

foreach ($dest in $dests) {Set-NaVol -Name $dest -Restricted}

Invoke-NaSnapmirrorInitialize $dest1 $source1
Invoke-NaSnapmirrorInitialize $dest2 $source2

Get-NaSnapmirror | select Status,BaseSnapshot,LagTimeTS

++++++++++++++++++++++

View solution in original post

1 REPLY 1

JSHACHER11

Got it!

++++++++++++++++++++++++++++

Import-Module dataontap

$filer = Read-Host "Enter the filer name"

$user = Read-Host "Enter the username"

Connect-NaController $filer -Credential $user

$source1 = Get-NaVol vol1

$source2 = Get-NaVol vol2

$dest1 = Get-NaVol vol3

$dest2 = Get-NaVol vol4

$dests = $dest1,$dest2

$sources = $source1,$source2

foreach ($dest in $dests) {Set-NaVol -Name $dest -Restricted}

Invoke-NaSnapmirrorInitialize $dest1 $source1
Invoke-NaSnapmirrorInitialize $dest2 $source2

Get-NaSnapmirror | select Status,BaseSnapshot,LagTimeTS

++++++++++++++++++++++

View solution in original post

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public