DPM will use free tapes before it uses expired tapes. The thinking is that once you overwrite an expired tape, it can no longer be used for recovery, so DPM favors using free tapes first. DPM always pull tapes from the highest slot number first, so a free tape in slot 8 will be used before a free tape in slot 2.
(DPM forum by Mike J)
Friday, January 13, 2012
How does DPM choose which tape to use First.
Friday, January 6, 2012
How to Troubleshoot Tape Library Sharing Configuration Issues in DPM 2010
A TechNet post about everything you need to consider when sharing a tape library in DPM.
Read more
Monday, September 12, 2011
Remove Tape from DPM database
When the data on a tape has expired it will show in the Tape Management Report as Tapes due online in the next x weeks.
When you do not add the tape back in the library the tape will eventually show up as over due Tapes.
There might be a situation where you are unable or unwilling to place the tape back in the library. For instance when the tape is broke, has been in the cycles for to long or the tape is even lost. In these cases you don’t want the tape to show up in report each week.
The procedure below (written by Mike Jacquet from Microsoft ) shows how to remove tapes from the Tape Management Report.
To remove a tape media from the over due tape report, you can run a SQL script to remove the media from the DPM database.
To run the script, perform the following steps:
1) Open the DPM console and under the reporting tab, double-click the "tape management" report and select the number of weeks you want a report for (up to 4 weeks).
2) Once the report opens- go to the page that list Over Due Tapes.
3) Make a note of the "Tape labels" for the tapes you want to remove from the DPM database so they will no longer show up on the report.
4) Make a backup of the DPMDB Sql database before proceeding using the following command:
DPMBACKUP -db (The database will be saved in the C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy\Database Backups folder.
5) Open SQL Enterprise manager and connect to the Server_name\$MSDPM2010 instance.
6) Under DATABASES - Highlight the DPMDB entry - then click on "NEW QUERY" button.
7) Copy / paste the following SQL script into the new query window.
---------- START COPY HERE -------------
-- overdue tapes
-- for clarity, set up the parameter as a variable
declare @paramTapeLabel as nvarchar(256)
set @paramTapeLabel = N'SAMPLE_TAPE_LABEL_NAME'
-- keys
declare @vMediaId as guid
declare @vGlobalMediaId as guid
-- if the delete gives trouble, add keyset after cursor
declare cur_label cursor
for select MediaId, GlobalMediaId
from tbl_MM_Media
where label = @paramTapeLabel;
open cur_label
while (0 = 0)
begin
fetch next from cur_label into @vMediaId, @vGlobalMediaId
-- test for being done
if @@fetch_status <> 0 break;
print 'Deleting MediaId = ' + cast(@vMediaId as varchar(36))
-- do a set of deletes atomically
begin transaction;
delete from tbl_MM_TapeArchiveMedia
where MediaId = @vMediaId;
delete from tbl_MM_MediaMap
where MediaId = @vMediaId;
delete from tbl_MM_ArchiveMedia
where MediaId = @vMediaId;
delete from tbl_MM_Global_ArchiveMedia
where MediaId = @vGlobalMediaId;
delete from tbl_MM_Global_Media
where MediaId = @vGlobalMediaId;
delete from tbl_MM_Media
where current of cur_label;
commit transaction;
end
close cur_label
deallocate cur_label
-------------- END COPY HERE ----------------------
8) replace the tape label name parameter in the script with the name of the tape label from the over due tape report that you want to delete.
set @paramTapeLabel = N'SAMPLE_TAPE_LABEL_NAME' <--- replace tape label between the single quotes ' '
9) Execute the SQL script.
10) Repeat steps 8. and 9. for each tape label that you want to delete.
Monday, June 21, 2010
Recatalog an Expired Tape
By default you are unable to restore data from a expired tape. Also the recatalog option is disabled for expired tapesWhen a has expired in DPM 2007. But you can use the following work around.
1) In the DPM admin console select the TAB Library Management, Select the Tape and mark the tape as Free.
2) Select the tape again Unmark tape as Free
3) Now the option re-catalog imported tape is available
4) After the catalog is completed you should be able to restore data from the tape
Note: On the restore tab you will find the items under External DPM Tapes
When you use this option to restore a Exchange mailbox; On the restore tab you will be unable to drive down to mailbox level. It is also not possible to restore to the Recovery Store Group (RSG).
Wednesday, October 7, 2009
Tape library inventory using Powershell
The command to start a fast or detailed inventory using Powershell is not to difficult, the trick is to get the correct name for the tape library.
In the example below we use an additional Powershell command to read the Library name in to a variable.
First we need to list all tape libraries attached to the DPM server. When you have a Tape library attached, you might see the drive listed as well. Note the order the tape libraries are listed.
(replace dpm01 with the name of your DPM server)
| PS > get-dpmlibrary -DPMServerName dpm01 Name Drives Slots I/E ports |
Now we read the library details in to the variable $DPMlib
(replace dpm01 with the name of your DPM server)
| $dpmlib = get-dpmlibrary -DPMServerName dpm01 |
Using the information collected with the first command we now can start the inventory. The number added to the $DPMlib variable is the order number in which the library is listed, start counting with 0. In this example, the number 1.
Fast inventory:
| PS > Start-DPMLibraryInventory -DpmLibrary $dpmlib[1] JobCategory Status HasCompleted |
Detailed inventory:
| PS > Start-DPMLibraryInventory -DetailedInventory -DpmLibrary $dpmlib[1] JobCategory Status HasCompleted |
When you use it in a script it will look like this
| $dpmlib = get-dpmlibrary -DPMServerName dpm01 |
Tuesday, September 1, 2009
Script to resolve: Free tape threshold reached
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:
Powershell script:
| 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
command file:
| powershell -command "& 'd:\ps_scripts\MarkExpiredTapesAsFree.ps1' <servername>" |
Thanks to Mischa for his help with the script.
Friday, July 31, 2009
Fast inventory fails
Found that the fast inventory of the Tape library in DPM can fail or show the wrong results in some cases. According to a newsgroup post this can be caused (in certain types of libraries) by the press of a cleaning tape.
The post reports this for IBM 35XX series and HP 1/8 tape libraries. We have seen the same issue on the Dell TL2000 tape library which is actually an IBM Totalstorage 3573 Tape library.
The workaround is to remove the cleaning tape from the library.
The newsgroup threat also describes a fix setting a registry key. (I have not tried this yet)
The rekey fix is to handle some unexpected behavior of tape library. The issue is when there is cleaner media present in some library element (slot/drive/transport ) the IOCTL_CHANGER_GET_ELEMENT_STATUS for that particular elment returns with ELEMENT_STATUS_EXCEPT set in CHANGER_ELEMENT_STATUS.Flags and CHANGER_ELEMENT_STATUS.ExceptionCode is set to ERROR_UNHANDLED_ERROR. This is unexpected behavior as per WHQL and as a result of this you will see Fast Inventory failing with "Hardware Issue". The workaround is added in DPM 2007 SP1 and we have seen this issue with only IBM 35XX series and HP 1/8 tape library
Thanks to Sachin
Wednesday, July 15, 2009
Regional Settings
I Found some unexpected behavior on a DPM server that is configured with an English OS, but with the Dutch regional settings.
When using the command: set-dpmGlobalproperty –DPMserverName <servername> -TapewritePeriodRatio 0.2 (this command configures the DPM settings for marking tapes ready for offsite storage)
This command works and the settings seem to be update.
When you after that request the active settings with the command: get-dpmGlobalproperty –DPMserverName <servername> TapewritePeriodRatio. You get the value back in the Dutch regional format, which is 0,2. (see above)The workaround is to configure the server with US regional settings at least for the decimal symbol and digit grouping symbol
Thanks to Peer for his help on this.
Tuesday, June 30, 2009
I/O device errors during tape backup
But I found also some issues where DPM fails to span to multiple tapes. This could be solved by creating a registry key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Data Protection Manager\Agent] "BufferQueueSize"=dword:00000001" This will ensure that backup will span to next available whenever any IO device error beyond of 30 GB on tape occurs. There by avoiding backup failures
Monday, June 8, 2009
Which tape drives are supported
It’s a little bit hidden on the Microsoft webpage. But a full overview of tape-drives en libraries supported by DPM 2007 can be found here: http://technet.microsoft.com/en-gb/dpm/cc678583.aspx
Additionally for HP drives you find the support Matrix here: http://h18000.www1.hp.com/products/storageworks/ebs/matrix_archives.html
Saturday, June 6, 2009
Tape collocation
To enable (from DPM management Shell): Set-DPMGlobalProperty -DpmServer
Requirement: Protection group must have the same tape retention period configured.