none
ForceFree-Tape.ps1 failing after updating to DPM 2012 SP1 CU1 RRS feed

  • Question

  • This command works on some tapes but on others it fails with the below error. It was working fine before updating to SP1 & CU1.

    PS D:\Microsoft System Center 2012\DPM\DPM\bin> .\ForceFree-Tape.ps1

    cmdlet ForceFree-Tape.ps1 at command pipeline position 1
    Supply values for the following parameters:
    DPMServerName: ad01dpm01
    LibraryName: dell ml6000 tape library
    TapeLocationList[0]: Slot-159
    TapeLocationList[1]:
    WARNING: Connecting to DPM server: ad01dpm01
    Setting tape in Slot-159 as free.
    Set-DPMTape : The selected tapes cannot be marked as free because they belong to protection groups.
    You need to stop protection of the associated protection groups before you can mark the tapes as free. The protection group that a tape belongs to is listed in the Protection Group column. (ID: 31116)
    At D:\Microsoft System Center 2012\DPM\DPM\bin\ForceFree-Tape.ps1:65 char:12
    +             Set-Tape <<<<  -Tape $media -Free
        + CategoryInfo          : NotSpecified: (:) [Set-DPMTape], ContainsValidDatasetException
        + FullyQualifiedErrorId : MarkAsFreeValidDatasetError,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.MarkMedia

    Thursday, March 28, 2013 2:46 PM

Answers

  • Bulletlynn,

    I dealt with Microsoft for 2 months with a Support ticket I had open with tape write issues.

    The conclusion that Microsoft gave me was the DPM team has coded in to DPM that if it gets any errors with the tapes it will not overwrite or allow you to erase the tape.  This could be an issue with the tapes themselves.

    Unfortunately it sounds like you do have some bad tapes.  What brand of tapes are you using? I had the issue with Quantum tapes.

    I do not know if Mike wants to chime in on this, but I literally worked with him and a few other top dogs in the DPM team with my issue.

    • Marked as answer by bulletlynn21 Tuesday, June 25, 2013 8:52 PM
    Wednesday, April 17, 2013 2:52 PM
  • We use Quantum tapes as well, it must have been a bad couple of tapes. I have been able to run this command on other tapes without issue.

    Thanks!

    • Marked as answer by bulletlynn21 Tuesday, June 25, 2013 8:52 PM
    Tuesday, June 25, 2013 8:52 PM

All replies

  • the power shell always seems to screw up.

    Try running this command in DPM shell.

    ForceFree.ps1 -DPMServerName <server> -LibraryName <nameoflibrary> -TapeLocation slot-<#>

    Thursday, April 4, 2013 2:46 PM
  • Tried running from DPM Shell with the additional commands and still receive the same error.

    The other strange thing is when I go to view the tape contents it says it needs to recatalog the tape before it can display its contents, but I never see DPM start the job to catalog. I wonder if I have some bad tapes?

    Tuesday, April 16, 2013 8:02 PM
  • Bulletlynn,

    I dealt with Microsoft for 2 months with a Support ticket I had open with tape write issues.

    The conclusion that Microsoft gave me was the DPM team has coded in to DPM that if it gets any errors with the tapes it will not overwrite or allow you to erase the tape.  This could be an issue with the tapes themselves.

    Unfortunately it sounds like you do have some bad tapes.  What brand of tapes are you using? I had the issue with Quantum tapes.

    I do not know if Mike wants to chime in on this, but I literally worked with him and a few other top dogs in the DPM team with my issue.

    • Marked as answer by bulletlynn21 Tuesday, June 25, 2013 8:52 PM
    Wednesday, April 17, 2013 2:52 PM
  • Did you get this sorted?

    Looks like it is not getting the recovery point and -ForceDeletion

    See this script (it is modified for stand alone drives) save it as SetTapeFree.ps1

    param ([string] $DPMServerName, [string] $LibraryName)
     if(("-?","-help") -contains $args[0])
     {
         Write-Host "Usage: ForceFree-Tape.ps1 [[-DPMServerName] <Name of the DPM server>] [-LibraryName]  <Name of the library>
         Write-Host "Example: Force-FreeTape.ps1 -Dpmservername SDPM01 -LibraryName   My library
         exit 0
     }
     if (!$DPMServerName)
     {
         $DPMServerName = Read-Host "DPM server name: "
         if (!$DPMServerName)
         {
             Write-Error "Dpm server name not specified."
             exit 1
         }
     }
     if (!$LibraryName)
     {
         $LibraryName = Read-Host "Library name: "
         if (!$LibraryName)
         {
             Write-Error "Library name not specified."
             exit 1
         }
     }

    if (!(Connect-DPMServer $DPMServerName))
     {
         Write-Error "Failed to connect To DPM server $DPMServerName"
         exit 1
     }
     $library = Get-DPMLibrary $DPMServerName | where {$_.UserFriendlyName -eq $LibraryName}
     write-host "Getting library..."
     if (!$library)
     {
         Write-Error "Failed to find library with user friendly name $LibraryName"
         exit 1
     }
     foreach ($media in @(Get-Tape -DPMLibrary $library))
     {
     write-host "Getting media..."
     
            if ($media -is [Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.LibraryManagement.ArchiveMedia])
             {
                 foreach ($rp in @(Get-RecoveryPoint -Tape $media))
                 {
       write-host "Getting recovery point..."
                     Get-RecoveryPoint -Datasource $rp.Datasource | Out-Null
                     Write-Verbose "Removing recovery point created at $($rp.RepresentedPointInTime) for tape in $($media.Location)."
                     write-host "Force removing recovery point..."
       Remove-RecoveryPoint -RecoveryPoint $rp -ForceDeletion -Confirm:$false
                 }
                 Write-Verbose "Setting tape in $($media.Location) as free."
          write-host "Setting tape as free..."
                 Set-Tape -Tape $media -Free
             }
             else
             {
                 Write-Error "The tape in $($media.Location) is a cleaner tape."
             }
       
     
    }

    Tuesday, May 28, 2013 8:18 AM
  • We use Quantum tapes as well, it must have been a bad couple of tapes. I have been able to run this command on other tapes without issue.

    Thanks!

    • Marked as answer by bulletlynn21 Tuesday, June 25, 2013 8:52 PM
    Tuesday, June 25, 2013 8:52 PM