Microsoft Virtualization Discussions

New-NcSnapmirror unable to make mirror_vault

Jonne
3,237 Views

 

We are unable to create a new mirror_vault relationship with powershell.


$src=$srcCluster+"://"+$srcSVM+"/"+$srcVol
$dst = $dstCluster+"://"+$dstSVM+"/"+$dstVol


[hashtable]$h = @{
 "Source" =  $src;    
 "Destination" = $dst;                
 "Type" = "mirror_vault";                
 "Policy" = $dstPolicy;                
 "Schedule" = "hourly";
}            

New-NcSnapmirror @h


New-NcSnapmirror : Invalid value specified for "relationship-type" element within "snapmirror-create": "mirror_vault".


--> It seems that New-NcSnapmirror is unable to create mirror_vault -type. Previous command works fine if we change the type to eg. vault.

Also the New-NcSnapmirror help says:

-Type <String>
    Specifies the type of SnapMirror relationship.  Possible values: dp, ls, vault, restore, transition_data_protection.



Is there any workaround to be able to create mirror_vault?


We have OnTap 9.1RC1 and the powershell toolkit version is 4.3.0.

 

 

------

 

FYI: We have created mirror_vault relatioship using gui. This can be verified with Get-NcSnapmirror:

 


$tmp = Get-NcSnapmirror -VserverContext test -Destination test:mirrorvault_test1
$tmp.PolicyType
mirror_vault

--> This works, and the syntax of the type seems to be mirror_vault.

 

 

2 REPLIES 2

asulliva
3,176 Views

Hello @Jonne,

 

You'll want to use a policy which has a type of "mirror_vault".

 

PS C:\Users\Andrew> Get-NcSnapmirrorPolicy -Query @{ Type = "mirror_vault" }

Name               TotalRules  TotalKeep      Tries TransferPriority   Restart  Vserver             
----               ----------  ---------      ----- ----------------   -------  -------             
MirrorAndVault              3         60          8 normal             always   VICE                

With the policy "MirrorAndVault" identified, create a new SnapMirror relationship as you described (I stole my example from here😞

 

$splat = @{
    "Source" =  "$srcCluster://$srcSvmName/$srcVolumeName";
    "Destination" = "$dstCluster://$dstSvmName/$dstVolumeName";
    "Policy" = "MirrorAndVault";
}
 
New-NcSnapmirror @splat

Hope that helps.

 

Andrew

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

Jonne
3,089 Views

Hi @ASULLIVAN

 

Thanks for the answer and for the link to your excellent blog. I fixed our syntax so that we are using the unedited system default MirrorAndVault -policy (and do not specify the type at all).

 

 

$splat = @{
    "Source" =  "$srcCluster://$srcSvmName/$srcVolumeName";
    "Destination" = "$dstCluster://$dstSvmName/$dstVolumeName";
    "Policy" = "MirrorAndVault";

    "Schedule" = "hourly";
}

New-NcSnapmirror @splat

 

 

Now we get the following error:

 

 

 

"The policy "MirrorAndVault" is not valid with type "DP" relationships. Only policies of type "async-mirror" are supported for SnapMirror DP relationships."

 

I wonder what could be wrong?

Public