Hi Kailas,
Are you using the NetApp Certified "Move Volume" command? If so and it's a bug you can log a support case (let me know the case number for review)
I had a look through the command code and didn't notice any issues but added to it. This might help debugging. Can you post a screenshot of the execution plan\logs?
Param(
[Parameter(Mandatory=$True, HelpMessage="The Cluster name or IP address")]
[String]$Cluster,
[Parameter(Mandatory=$True, HelpMessage="The Data ONTAP version installed on the cluster")]
[String]$OntapVersion,
[Parameter(Mandatory=$True, HelpMessage="The name of the volume to be moved")]
[String]$VolumeName,
[Parameter(Mandatory=$True, HelpMessage="The name of the vserver hosting the volume")]
[String]$VserverName,
[Parameter(Mandatory=$True, HelpMessage="The name of the aggregate to which the volume will be moved")]
[String]$DestinationAggregate,
[Parameter(Mandatory=$False, HelpMessage="Specify to Encrypt the Destination Volume. This parameter will work only for clusters running ONTAP versions 9.1.0 and above.")]
[Bool]$EncryptDestination,
[Parameter(Mandatory=$False, HelpMessage="The volume security style.")]
[ValidateSet("mixed","unix", "ntfs")]
[String]$SecurityStyle,
[Parameter(Mandatory=$False, HelpMessage="Generate New Key for Destination Volume. This parameter will work only for clusters running ONTAP versions 9.2.0 and above.")]
[Bool]$GenerateDestinationKey,
[Parameter(Mandatory=$False, HelpMessage="The time to complete cutover in seconds. Default value is 45 seconds")]
[Int]$CutoverWindow=45,
[Parameter(Mandatory=$False, HelpMessage="The number of cutover attempts. Default value is 3")]
[Int]$CutoverAttempts=3,
[Parameter(Mandatory=$False, HelpMessage="The action to be taken for cutover")]
[ValidateSet("abort_on_failure", "defer_on_failure", "force","wait")]
[String]$CutoverAction="defer_on_failure",
[Parameter(Mandatory=$False, HelpMessage="The tiering policy that is to be associated with the volume.")]
[String]$TieringPolicy,
[Parameter(Mandatory=$False, HelpMessage="The maximum number of ZAPI retry attempts.")]
[Int]$ZapiRetryCount
)
#'------------------------------------------------------------------------------
#'Connect to the cluster
#'------------------------------------------------------------------------------
Connect-WfaCluster $Cluster
#'------------------------------------------------------------------------------
#'Ensure command input parameters are valid with the ONTAP version.
#'------------------------------------------------------------------------------
$versionComparisionValue910 = Compare-OntapVersions $OntapVersion '9.1.0'
If($EncryptDestination){
If($versionComparisionValue910 -lt 0){
Throw "Destination volume encryption can only be specified only on clusters running ONTAP version 9.1.0 and above"
}
}
If((-Not($EncryptDestination)) -And ($GenerateDestinationKey)){
Throw "The 'EncryptDestination' parameter should be true when the 'GenerateDestinationKey' is specified"
}
Get-WFALogger -Info -Message "Command Parameter Validation completed successfully"
#'------------------------------------------------------------------------------
#'Validate the volume move operation.
#'------------------------------------------------------------------------------
Try{
Get-WFALogger -Info -message "Validating move operation for volume ""$VolumeName"" on vserver ""$VserverName"" to aggregate ""$DestinationAggregate"""
Start-NcVolMove $VolumeName -DestinationAggregate $DestinationAggregate -Vserver $VserverName -CutoverWindow $CutoverWindow -CutoverAttempts $CutoverAttempts -CutoverAction $CutoverAction -ValidateOnly -ErrorAction Stop
Get-WFALogger -Info -message $("Validation completed successfully")
}Catch{
Throw $("Failed to validate the volume move operation for volume ""$VolumeName"" on vserver ""$VserverName"". Error " + $_.Exception.Message)
}
#'------------------------------------------------------------------------------
#'Check if there is already an acitve job for the volume to the same destination.
#'------------------------------------------------------------------------------
[Bool]$TriggerVolMoveJob = $True
$value = Compare-OntapVersions $OntapVersion '8.1.1'
#'------------------------------------------------------------------------------
#'Note: volume-move-get-iter API is available only from 8.1.1 onwards.
#'------------------------------------------------------------------------------
If($value -gt -1){
$jobQuery = Get-NcVolMove -Template
$jobQuery.DestinationAggregate = $DestinationAggregate
$jobQuery.Volume = $VolumeName
$jobQuery.Vserver = $VserverName
$moveJobs = @(Get-NcVolMove -Query $jobQuery)
ForEach($volMoveJob In $moveJobs){
If(($volMoveJob.State -ne "done") -And ($volMoveJob.State -ne "failed")){
Get-WFALogger -Info -Message $("The Volume move job for volume ""$VolumeName"" on vserver ""$VserverName"" was already started to aggregate ""$DestinationAggregate"" with job status of " + $volMoveJob.State + ".")
[Bool]$TriggerVolMoveJob = $False
}
}
}
#'------------------------------------------------------------------------------
#'Move the volume.
#'------------------------------------------------------------------------------
If($TriggerVolMoveJob){
If($GenerateDestinationKey){
[String]$command = "Start-NcVolMove $VolumeName -EncryptDestination -GenerateDestinationKey -DestinationAggregate $DestinationAggregate -Vserver $VserverName -CutoverWindow $CutoverWindow -CutoverAttempts $CutoverAttempts -CutoverAction $CutoverAction "
}ElseIf($EncryptDestination -eq $True){
[String]$command = "Start-NcVolMove $VolumeName -EncryptDestination -DestinationAggregate $DestinationAggregate -Vserver $VserverName -CutoverWindow $CutoverWindow -CutoverAttempts $CutoverAttempts -CutoverAction $CutoverAction "
}ElseIf($EncryptDestination -eq $False){
[String]$command = "Start-NcVolMove $VolumeName -DecryptDestination -DestinationAggregate $DestinationAggregate -Vserver $VserverName -CutoverWindow $CutoverWindow -CutoverAttempts $CutoverAttempts -CutoverAction $CutoverAction "
}Else{
[String]$command = "Start-NcVolMove $VolumeName -DestinationAggregate $DestinationAggregate -Vserver $VserverName -CutoverWindow $CutoverWindow -CutoverAttempts $CutoverAttempts -CutoverAction $CutoverAction "
}
If($TieringPolicy){
[String]$command += "-TieringPolicy $TieringPolicy "
}
[String]$command += "-ErrorAction Stop"
Try{
Invoke-Expression -Command $command -ErrorAction Stop
Get-WFALogger -Info -Message "Executed Command`: $command"
}Catch{
Get-WFALogger -Error -Message $("Failed Executing Command`: $command. Error " + $_.Exception.Message)
Throw $("Failed to start moving volume ""$VolumeName"" on vserver ""$VserverName"" to aggregate ""$DestinationAggregate"". Error " + $_.Exception.Message)
}
If($job.Status -eq "Succeeded"){
Get-WFALogger -Info -Message $("The Volume ""$VolumeName"" on vserver ""$VserverName"" was already moved to aggregate ""$DestinationAggregate"".")
}Else{
Get-WFALogger -Info -Message $("Started moving volume ""$VolumeName"" on vserver ""$VserverName"" to aggregate ""$DestinationAggregate"" (job " + $job.JobId + ")")
}
}
#'------------------------------------------------------------------------------
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.