Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
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!
Solal.
Solved! See The Solution
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.
Regards
Abhi
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?
Thanks.
Solal.
Solal,
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.
Here with an example:
PS C:\Users\Administrator> Invoke-NaSsh -Name 1.2.3.4 -Credential $creds -Command "dfpm help"
NAME
dfpm -- Data management system
DESCRIPTION
This command manages the data management module
For help on a particular command, use
dfpm <command> help
where <command> is from the list below.
COMMANDS
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
relationships
dfpm service manage storage services
PS C:\Users\Administrator>
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!
Solal
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.
Regards
Abhi
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.
Solal.
Well then.
Succeeded with the following:
#$dfmZapiServer = New-WfaZapiServer -Host $DFMServerName -Type DFM -Port 8088 -Credentials $creds
$creds = Get-WfaCredentials -Host dfm-server
if(!$creds)
{
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");
$api.addChildElement($xi);
$xi.addNewChild("cleanup-stale-storage","no_cleanup");
$xi.addNewChild("destination-aggregate-name-or-id","filer:aggr_64_300g_15k_1");
$xi1 = New-Object NetApp.Manage.NaElement("volumes");
$xi.addChildElement($xi1);
$xi1.addNewChild("obj-name-or-id","filer:/vf_solal_data_2");
$res = $server.InvokeElem($api)
Now I'll try to build that mentioned workflow on top of it