Forum Discussion

daniel_swindle2's avatar
3 years ago

HI all, new to the channel but have a question.

I'm trying to copy a snapshot to an existing vvol using the command "Copy-PfaSnapshotToExistingVvolvmdk". It works great 95% of the time. However we replicate data from one array to another, and I'm trying to do this on the secondary. 5% of the time the command fails with an error indicating that it can't do it because all of the data is not available yet. The worst part is that my entire PowerShell script stops executing when that happens, even when I wrap it in a Try/Catch block. My question is, does anyone know how to verify that a snapshot is 100% ready to use before I attempt to do the Copy-PfaSnapshotToExistingVvolvmdk command?

17 Replies

  • #Get Most Recent Completed Snapshot Write-Host "Obtaining the most recent snapshot for the protection group..." -ForegroundColor Red $MostRecentSnapshots = Get-PfaProtectionGroupSnapshots -Array $array -Name $srcprotectiongroup | Sort-Object created -Descending | Select-Object -Property name -First 2 # Check that the last snapshot has been fully replicated $FirstSnapStatus = Get-PfaProtectionGroupSnapshotReplicationStatus -Array $array -Name $MostRecentSnapshots[0].name # If the latest snapshot's completed property is , then it hasn't been fully replicated - the previous snapshot is good, though if ($ -ne $FirstSnapStatus.completed) { $MostRecentSnapshot = $MostRecentSnapshots[0].name } else { $MostRecentSnapshot = $MostRecentSnapshots[1].name }
  • Ok, so can I use the PfaProtectionGroupSnapshotReplicationStatus from the secondary (replication destination) or do I have to check from the primary (replication source)?
  • Also, when I try to use that cmdlet I get the error "Get-PfaProtectionGroupSnapshotReplicationStatus : {"msg": "page not found"}"