When you have a tape library for which you change the tapes on a daily or weekly basis you properly run in to the following warning: Free tape threshold reached.
|The number of free tapes in the Tape Library ,name> is less than or equals the threshold value of #. You must add tape to the library and it as free in order to prevent future backups from failing (ID 3305)|
You receive this warning even when there are enough expired tapes available in the tape library. You get this warning because DPM checks the number of free tapes, in spite of the fact that DPM can write to expired tapes as well.
The advised resolution in DPM is manually mark all expired tapes as free. However a real IT-admin does not like manual labor. Therefore we created a PowerShell script that checks for expired tapes and marks them free.
If you run the script manually it looks like this:
param ([string] $DPMServerName)
$_.DatasetState -eq "Recyclable"})
We have scheduled this script to run daily using the Windows task scheduler. Expired tapes are now mark as free on a daily basis
In order to schedule a Powershell command you need to create a cmd that calls the Powershell script. The command file is listed below
|powershell -command "& 'd:\ps_scripts\MarkExpiredTapesAsFree.ps1' <servername>"|
Thanks to Mischa for his help with the script.