Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
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)
The "Invoke-NaVfilerDrResync" cmdlet may be what you're looking for.
Andrew
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.
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
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!
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
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
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.
Andrew