Microsoft Virtualization Discussions

New-NcSnapmirror unable to make mirror_vault



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

$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

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





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.



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




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?

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.