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.



Re: New-NcSnapmirror unable to make 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.

Re: New-NcSnapmirror unable to make mirror_vault



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?