2014-01-09 04:33 AM
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!
Solved! SEE THE SOLUTION
2014-01-09 04:51 AM
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?
2014-01-09 11:41 AM
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.
2014-01-09 11:49 AM
Here with an example:
PS C:\Users\Administrator> Invoke-NaSsh -Name 184.108.40.206 -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
2014-01-09 01:05 PM
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?
2014-01-13 05:10 AM
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.
2014-01-13 06:12 AM
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?
2014-01-16 08:31 AM
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