2016-04-05 09:00 AM - edited 2016-04-05 09:01 AM
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 email@example.com
Is there an equivalent cmdlet in the Netapp Powershell Toolkit to achieve the same?
(My environment is 8.2.2 7-mode)
2016-04-05 09:15 AM
The "Invoke-NaVfilerDrResync" cmdlet may be what you're looking for.
2016-04-05 09:32 AM
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.
2016-04-05 09:42 AM
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.
2016-04-06 02:37 AM
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!
2016-04-06 06:30 AM
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.
2016-04-07 06:54 AM
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.
2016-04-07 10:03 AM
One more note after some additional clarification internally...
The command “vfiler dr resync” is used for two purposes:
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.