Software Development Kit (SDK) and API Discussions

Powershell Toolkit - cmdlets for vfiler dr resync?

markey164
3,670 Views

 

I'm writing a Powershell script that creates a volume, adds it to a named vfiler, it then creates a snapmirror target volume on a DR Netapp for replication. This all works well. However as we are using vfiler DR, we need to run the vfiler DR resync command, to synchronise the volumes that are part of the vfiler DR relationship.

 

In the Netapp CLI,  I would achieve this by running the following from the snapmirror destination filer:

vfiler dr resync -c secure -l root:password vfilername@hostfiler.domain.co.uk

 

Is there an equivalent cmdlet in the Netapp Powershell Toolkit to achieve the same?

 

(My environment is 8.2.2 7-mode)

7 REPLIES 7

asulliva
3,660 Views

The "Invoke-NaVfilerDrResync" cmdlet may be what you're looking for.

 

Andrew

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

markey164
3,656 Views

Hi Andrew,

 

I was mulling over that one, but the Description/Synopsis of that cmdlet suggests this command will :

 

"Move a vfiler which has been migrated by vfiler disaster recovery back to its original controller"

 

I don't want to move the vfiler, i only want to run a resync after adding the new volume, hence this didn't look like what i was after? I could be wrong in my interpretation though.

asulliva
3,655 Views

I see that now, and the ZAPI docs reflect the same operation.  This is significantly different than what the CLI command, with the exact same name, does...I'm going to see if I can track down the internal owner and get an authoratative answer.

 

Andrew

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

markey164
3,619 Views

Andrew,

 

Thankyou, that would be great!

 

It would be a shame if this function can't be automated via Powershell. Its the last bit I need to complete my script!

asulliva
3,607 Views

If nothing else, you could use Invoke-NaSsh or Invoke-NaSystemApi (using system-cli).  It's not as graceful, e.g. no object returned, just the raw CLI output, but you would be able to execute the task.

 

Andrew

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

asulliva
3,584 Views

I checked with engineering (thanks Naveed!) and we believe that the documentation is wrong and the "vfiler-dr-resync" ZAPI is the equivalent of the CLI command "vfiler dr resync", which means that the cmdlet Invoke-NaVfilerDrResync should also have the same functionality.

 

Of course, to be 100% safe, you should test beforehand : )

 

Let me know if I can help.

 

Andrew

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

asulliva
3,573 Views

One more note after some additional clarification internally...

 

The command “vfiler dr resync” is used for two purposes:

 

  1. It can be run on the DR vfiler unit to resynchronize it with the original vfiler unit which is currently active.
  2. It can be run on the original vfiler unit to resynchronize with the currently activated DR vfiler unit before reactivating the original vfiler unit.

Depending on the command arguments, it will identify which one of the two uses and act accordingly.  It appears that the documentation only reflects the second of those use cases, however the ZAPI *should* work the same...which means that the cmdlet should as well.

 

Andrew

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