Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! See The Solution
1 ACCEPTED SOLUTION
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
++++++++++++++++++++++
1 REPLY 1
migration has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
++++++++++++++++++++++
