Accepted Solution

dfpm migrate automation ideas?

Hey fellas.

I'm trying to automate a volume migration for one of my customers.

He is migrating volumes between DFM resource pools via the "Manage Space" button in the DFM due to the fact that these volumes are QSM targets on DR/B2D systems.

There's really no other way to manage that in such a way that dfpm will continue acknowledging the moves volumes.

Hence, I'm trying to automate the migration jobs via CLI, and in WFA.

I know the commands relevenat (under dfpm migrate volume....)

I'll aim for a list of volumes to be moved via dfpm cli and resource pools to move to (also via dfpm cli).

I'd appreciate any ideas on how to tackle this thing.

Is it even possible to use this dfpm migrate cli and is the DFM data source that exists?

Thanks guys in advance!


Re: dfpm migrate automation ideas?

An addition to the explanation for the help needed:

I have the logics for getting and quering volumes on specific resource pool and choose target resource pool to move to.

I wanted to know if it is possible to send SSH / RSH / something similar to the DFM to run command like dfpm migrate volume..

The equiviland in netapp commands is "Invoke-NaSsh". Can I run something similar for DFM commands?



Re: dfpm migrate automation ideas?


      This Invoke-NaSsh can definitely be used for connecting to a DFM server via SSH. This Invoke-NaSsh is nothing but a regular SSH client and will work on any host and not necessarily only for netapp arrays.

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

Re: dfpm migrate automation ideas?

Here with an example:

PS C:\Users\Administrator> Invoke-NaSsh -Name -Credential $creds -Command "dfpm help"


    dfpm -- Data management system


    This command manages the data management module

    For help on a particular command, use

              dfpm <command> help

    where <command> is from the list below.


     dfpm help                          get help for the command

     dfpm version                       get version for dfpm

     dfpm schedule                      manage Data Protection Schedule

     dfpm respool                       manage resource pools

     dfpm job                           manages data protection and provisioning jobs.

     dfpm policy                        manage data protection and provisioning policies

     dfpm dataset                       manage datasets

     dfpm throttle                      manage throttles

     dfpm backup                        manage backups

     dfpm restore                       manage restore

     dfpm vfiler                        manage vFiler units and vFiler templates

     dfpm migrate                       manage migrate operations

     dfpm relationship                  list SnapVault, Volume SnapMirror and Qtree SnapMirror


     dfpm service                       manage storage services

PS C:\Users\Administrator>

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

Re: dfpm migrate automation ideas?

Hey sinhaa.

Thanks a lot for that! will use this one...

Now, I got to the point that user can choose a volume from a resource pool and move it to new aggregate with the dfpm migrate command...

Customer wants it to be more automated... lets say, choose a RP then it'll do all of its volumes, chunk after chunk, lets say 8.

If there are 80 volumes to move from a chosen RP, how can I automate it to take 8 every time, like in a while command and continue like that till it finishes?

Thanks again!


Re: dfpm migrate automation ideas?

Hi Solal:

A similar workflow is present in WFA 2.1.

You can look into the workflow "Controller and shelf upgrade of a HA pair".

It is almost similar to moving 80 volumes, 8 every time.



Re: dfpm migrate automation ideas?

That's right. Thanks for reminding!

Will use its mechanism for my workflow. Will upload when ready...

One more thing...

Idea about exploring mounts and CIFS shares for each volume (or qtree in that volume) to remove before each dfpm command?

Thanks again.


Re: dfpm migrate automation ideas?

There are couple of commands available in WFA which can help you to do so.

You can use the 'Search' facility to find out the commands or workflows.

Attached is a jpeg from the 'Search'.



Re: dfpm migrate automation ideas?

Well then.

Succeeded with the following:

#$dfmZapiServer = New-WfaZapiServer -Host $DFMServerName -Type DFM -Port 8088 -Credentials $creds

$creds = Get-WfaCredentials -Host dfm-server




    throw "Failed to connect to DFM: " + "dfm-server" + ".`nNo credentials were found.";


[NetApp.Manage.NaServer] $server = New-WFAZapiServer -Host dfmserver  -Credentials $creds -Type "DFM"

$api = New-Object NetApp.Manage.NaElement("migrate-volume");

$xi = New-Object NetApp.Manage.NaElement("migration-request-info");




$xi1 = New-Object NetApp.Manage.NaElement("volumes");



$res = $server.InvokeElem($api)

Now I'll try to build that mentioned workflow on top of it