none
cannot remove old DPM Library or tapes DPM 2012 RRS feed

  • Question

  • so quick explination of what happened...

    Got a new Tape Library we will call LIB2, reconized by DPM just fine, however did not read barcodes corectly, a backup job was successfully run on LIB2, Tech came out and replaced LIB2 with LIB3, LIB3 now running backups just fine after new lables on tapes, however in powershell get-DPMLibrary still shows the old library with tapes in it.

    typically this would not be an issue however , i have to re-lable all of our tapes due to the new HP tape drive (LIB2 & LIB3)  not reconizing the old barcodes.

    So how do i remove a tapes from an offline tape library?

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> remove-dpmtape -
    DMLibrary $dpmlib[0] -Tape $tape[1]
    
    Confirm
    Are you sure you want to perform this action?
    Moves tape to IE port in library HP-MSL-G3-2X.
    [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
    (default is "Y"):
    Remove-DPMTape : Operation failed because Tape Library HP-MSL-G3-2X is offline
     (ID: 31137)
    At line:1 char:15
    + remove-dpmtape <<<<  -DPMLibrary $dpmlib[0] -Tape $tape[1]
        + CategoryInfo          : NotSpecified: (:) [Remove-DPMTape], LibraryOffli
       neException
        + FullyQualifiedErrorId : LibraryOffline,Microsoft.Internal.EnterpriseStor
       age.Dls.UI.Cmdlet.TriggerRemoveMediaCmdlet

    Thursday, July 12, 2012 1:25 PM

All replies

  • additional info - HP-MSL-G3-2X is LIB2 \ LIB3

    $lib = Get-DPMLibrary -DPMServerName DPMSERVER

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> get-dpmTape $lib[0] |fl


    Location         : Slot-13
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Location         : Slot-7
    Tape label       : Exchange MBX-LT-1Weeks-Copy0-00000004
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : True
    Protection Group : Exchange MBX

    Location         : Slot-17
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Location         : Slot-11
    Tape label       : APPS-LT-1Weeks-Copy0-00000009
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : True
    Protection Group : APPS

    Location         : Slot-6
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Location         : Slot-3
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Location         : Slot-10
    Tape label       : SQL-LT-1Weeks-Copy0-00000009
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : True
    Protection Group : SQL

    Location         : Slot-4
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Location         : Slot-21
    Tape label       : Cluster File Shares-00000065
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group : Cluster File Shares

    Location         : Slot-2
    Tape label       : Free
    Library          : HP-MSL-G3-2X
    Tape barcode     : None
    Offsite Ready    : False
    Protection Group :

    Thursday, July 12, 2012 5:39 PM
  • PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $lib[0] |fl


    Name                  : Library: HP-MSL-G3-2X: (Offline)
    Number of drives      : 2
    Number of slots       : 24
    Number of I/E ports   : 0
    Status                : Offline
    Computer              : DPMSERVER
    Door                  : Locked
    Barcode reader        : Available
    Autoloader            : Available
    Library serial number : NONEYA
    Autoloader location   : Port 4, Bus 0, Target 10, Lun 1
    Protection groups     :
    Thursday, July 12, 2012 5:40 PM

  • Hi,

    There is no supported way to remove obsloete library or tape media entries from the DPMDB - they should not cause any problems.  Eventually, old used tapes without barcodes will show up in the tape managemet report as being overdue, but could be ignored.

    Although not supported (Make a backup of DPMDB first by running dpmbackup -db) - you can remove the tape from the overdue tape report by running this SQL Query.

     

    -- remove overdue tapes using tape label
    -- 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


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 12, 2012 6:51 PM
    Moderator
  • figured that would be a response, so right now I'm looking to move the tapes to the correct "MediaPoolId" in SQL

    I can find where it is, and where it needs to go with this statement

    select library.ProductId, library.SerialNo, library.LibraryId, mpool.Name, mpool.MediaPoolId, mpool.GlobalMediaPoolId
    from tbl_MM_MediaPool mpool
        inner join tbl_MM_Library library
            on mpool.LibraryId = library.LibraryId
            Order by SerialNo

    once i have figured what needs to be updated ill post my findings here.

    Thursday, July 12, 2012 8:07 PM
  •  they should not cause any problems. 

    currently it is a problem, DPM shows the tapes as 'Unknown'

    It also tries to inventory them and comes back with an error saying they are write protected (they are not).

    Thursday, July 12, 2012 8:27 PM
  • DPM should not show those tapes since the library is physically gone.  It seems that you still have protection group(s) configured to use that old library.  Once you reconfigure the PG's to use only the new library, that old one will disapear from the library tab.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 12, 2012 8:43 PM
    Moderator
  • no protection groups are configured to use the old library, i verified this twice. In the gui at least, not sure if there is a command to check in PS.

    • Edited by Jeramy_T Thursday, July 12, 2012 9:36 PM
    Thursday, July 12, 2012 9:24 PM
  • OK, Then that means that the "unknown tapes" are physically located in an online tape library and not the phantom tapes you want to get rid of.

    You can see what PG's are assigned to what library using this PS command.

    $DPMservername=&"hostname"
    Get-DPMLibrary -DPMServerName $DPMServername | select-object UserFriendlyName,serialnumber,IsOffline,IsEnabled,protectiongroups | Format-List


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 12, 2012 10:03 PM
    Moderator
  • UserFriendlyName : HP-MSL-G3-2X
    SerialNumber     : NONEYA
    IsOffline        : True
    IsEnabled        : True
    ProtectionGroups :
    
    
    Friday, July 13, 2012 3:56 PM
  • yes they are physcally located in the online tape library, an not in the old one....should i remove them and then re-scan?
    Friday, July 13, 2012 3:56 PM
  • Please place an unknown tape in slot-1 then run the below library checker tool.

    Please download and run the DPMtapeLibraryCompatibilityChecker tool from the following link.

    https://skydrive.live.com/?cid=885774776d4f197a&sc=documents&id=885774776D4F197A%21128


    For Standalone drive.
    =====================

    Run the following command to list libraries attached to the system.

    DPMLibraryTest.exe /Certify /LL


    Run the following command, where \\.\tape######## is the symbolic name of the tape drive to test from the output of the /LL command.


    DPMLibraryTest.exe /CERTIFY /TL \\.\Tape2147483646 /SA


    For tape library
    ================

    Run the following command to list the libraries attached to the system:

    DPMLibraryTest.exe /Certify /LL

    Run the following command, where \\.\Changer# is the symbolic name of the tape library to test from the output of the /LL command.

    DPMLibraryTest.exe /CERTIFY /TL \\.\Changer0 /ST 1 2 4 5


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 13, 2012 3:59 PM
    Moderator
  • I removed the tapes and rescanned, old library is gone now. running the test now

    DPMLibraryTest.exe /CERTIFY /TL \\.\Changer1 /ST 1 2 4 5
    DPMLA Service is running, Do you want to stop it [Y/N :Default(Y)]:y
    
    
    
    TEST CONFIGURATION:
    Testing library                           : \\.\Changer1
    Number of drives                          : 2
    Number of slots                           : 24
    Number of I/E ports                       : 0
    Number of media present in library        : 20
    Library supports barcode                  : Yes
    Using Non-Cleaner tape from slot         : 0
    Barcode for the Non-Cleaner tape         : LYU419L4
    WARNING: Above mentioned media may get overwritten by this tool, You want to con
    tinue?[Y/N :Default(Y)]:y
    
    Using Cleaner tape from slot             : 1
    Barcode for the Cleaner tape             : LYU411L4
    WARNING: Cleaner tape is not having CLN barcode
    Drive to be used for testing              : \\.\Tape2147483644
    Drive bay index of drive to be used        : 0
    
    
    RUNNING TEST CASES:
    Running DPM Library Detection Test ...
    Found 2 Tape Libraries
    Found 0 Standalone Drives
    --------------------- Tape Library Information ----------------
    LIBRARY (Drive bays - 1, Drives - 1)
              Device Name         : \\.\Changer0
              Device Serialnumber : MXA******
              Device Vendor Name  : Hewlett Packard MSL G3 Series library  (x64 base
    d)
              Device Product Name : Hewlett Packard
              FirmWare Revision     : 4.70
              Device SCSI Props   : (P,B,T,L)3,0,9,1
    
    DRIVE - 0, DRIVE Bay Index - 0
              Device Name         : \\.\Tape2147483645
              Device Serialnumber : HU******
              Device Vendor Name  : Hewlett Packard LTO Ultrium-4 drive
              Device Product Name : Hewlett Packard
              FirmWare Revision     : H58W
              Device SCSI Props   : (P,B,T,L)3,0,9,0
    
    LIBRARY (Drive bays - 2, Drives - 2)
              Device Name         : \\.\Changer1
              Device Serialnumber : MXA******
              Device Vendor Name  : Hewlett Packard MSL G3 Series library  (x64 base
    d)
              Device Product Name : Hewlett Packard
              FirmWare Revision     : 5.70
              Device SCSI Props   : (P,B,T,L)3,0,12,1
    
    DRIVE - 0, DRIVE Bay Index - 0
              Device Name         : \\.\Tape2147483644
              Device Serialnumber : HU******
              Device Vendor Name  : Hewlett Packard LTO Ultrium-5 drive
              Device Product Name : Hewlett Packard
              FirmWare Revision     : Y5BW
              Device SCSI Props   : (P,B,T,L)3,0,12,0
    
    DRIVE - 1, DRIVE Bay Index - 1
              Device Name         : \\.\Tape2147483643
              Device Serialnumber : HU******
              Device Vendor Name  : Hewlett Packard LTO Ultrium-5 drive
              Device Product Name : Hewlett Packard
              FirmWare Revision     : Y5BW
              Device SCSI Props   : (P,B,T,L)4,0,11,0
    
    ------------------- End of Tape Library Information -----------
    
    Does the rescan result match you hardware configuration? [Y/N Default(Y)]:y
    DPM Library Detection Test ...
    Succeeded
    
    Running DPM Mount/Dismount Test ...
    

    Friday, July 13, 2012 7:08 PM
  • 1D78	07/13	19:11:59.187	30	dpmlibrarytesttool.cpp(753)			NORMAL	Result: 4 tests completed successfully, 0 failed

    the only part i see any errors is


    1D78	07/13	19:10:06.274	30	system.cpp(513)			NORMAL	FAILED PrepareTape [TAPE_LOAD] on drive result=456
    07C4	1D78	07/13	19:10:06.289	30	system.cpp(505)			NORMAL	PrepareTape operation 3 returned 0, failing 
    07C4	1D78	07/13	19:10:06.289	30	system.cpp(508)			WARNING	Failed: Hr: = [0x80070456] : F: lVal : HRESULT_FROM_WIN32(result)

    1D78	07/13	19:02:36.058	30	utility.cpp(273)			WARNING	Failed: Hr: = [0x80070424] QueryServiceStatus failed
    07C4	1D78	07/13	19:02:36.058	30	utility.cpp(349)			WARNING	Failed: Hr: = [0x80070424] GetServiceStatus for NtmsSvc service failed, ignoring the failure
    07C4	1D78	07/13	19:02:36.058	30	utility.cpp(266)			WARNING	Failed: Hr: = [0x80070424] : F: lVal : (HANDLE)(schService = OpenServiceW( schSCManager, strServiceName.PeekStr(), 0x0004))
    07C4	1D78	07/13	19:02:36.058	30	utility.cpp(195)			WARNING	Failed: Hr: = [0x80070002] : F: lVal : HRESULT_FROM_WIN32(2)
    07C4	1D78	07/13	19:02:36.058	30	cfgclass.cpp(1104)	[0000000000118390]		NORMAL	We got 3  devices for class 0
    07C4	1D78	07/13	19:02:36.058	30	cfgclass.cpp(176)	[00000000002F5A38]		NORMAL	Initializing Device with path \\?\scsi#sequential&ven_hp&prod_ultrium_4-scsi#5&1edad224&0&000900#{53f5630b-b6bf-11d0-94f2-00a0c91efb8b}
    07C4	1D78	07/13	19:02:36.058	30	system.cpp(1183)			WARNING	Failed: Hr: = [0x80070002] Failed to initialize IOCTL timeout from registry. Initializing with default timeout [900000 ms].
    07C4	1D78	07/13	19:02:36.058	30	system.cpp(1168)			WARNING	Failed: Hr: = [0x80070002] : F: lVal : r.GetValue(L"LibraryIoctlTimeout", &s_dwIoctlTimeoutInMs)
    07C4	


    • Edited by Jeramy_T Friday, July 13, 2012 7:19 PM
    Friday, July 13, 2012 7:17 PM
  • as a side note

    Using Cleaner tape from slot             : 1
    Barcode for the Cleaner tape             : LYU411L4
    WARNING: Cleaner tape is not having CLN barcode
    Drive to be used for testing              : \\.\Tape2147483644
    Drive bay index of drive to be used        : 0

    this is not the bar code for the cleaner tape, the actual cleaning tape HAS an CLN barcode but its on in slot 2.

    Friday, July 13, 2012 7:26 PM
  • Affected area:	 (LYU419L4)
    Occurred since:	7/13/2012 11:43:09 AM
    Description:	The detailed inventory of tape failed for the following reason: (ID 3316)
    	DPM failed to write to tape because the tape is write-protected. (ID 30104 Details: The media is write protected (0x80070013))
    	More information
    Recommended action:	Remove the write protection from the tape and retry the operation.
    	Run tape inventory job again...
    Resolution:	To dismiss the alert, click below
    	Inactivate
    

    This is the message i get trying to identify the tape.

    Friday, July 13, 2012 7:29 PM
  • now the tape is showing as "Unrecognized" instead of Unknown
    Friday, July 13, 2012 7:32 PM
  • Hi,

    I noticed that the tape library checker showed that you have a mixture of LTO-4 and LTO-5 drives in the library.  What kind of tape is reporting the write protected error ?

    The specification for LTO media dictates that tape drives can support and allow read/write for their generation as well as the previous generation but for any that are more than one generation in difference it will only allow read access.

    So, for example, an LTO-4 drive can read/write LTO-4, can read/write LTO-3, can read LTO-2, and is incompatible with LTO-1.

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 13, 2012 8:37 PM
    Moderator
  • 2 LTO5 drives, the tapes are LTO4,

    there is one LTO 4 library, but it is currently not used.

    • Edited by Jeramy_T Friday, July 13, 2012 9:02 PM
    Friday, July 13, 2012 9:01 PM
  • the tapes with the errors are LTO4, all of our tapes are LTO4
    Monday, July 16, 2012 4:37 PM
  • Hi,

    If the tape library checker is passing the write test, but DPM fails to write to the same drive, then we need to investigate why.  Please open a DPM 2012 support ticket. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, July 16, 2012 5:28 PM
    Moderator
  • ok how do i do that? and does it cost extra?
    Tuesday, July 17, 2012 1:57 PM
  • Hi,

    If you want to pursue this immediatly, you can visit the following web site to open a support incident. The charge to your CC will not be processed until your case is resolved and closed, if it's a code defect in the DPM then we wave all charges.

    http://support.microsoft.com/select/Default.aspx?target=assistance

    In the Quick product finder, enter:

    System Center Data Protection Manager [2007 or 2010]
    or System Center 2012 then select System Center 2012 Data Protection Manager


    In the next screen, chose the option that applies.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, July 17, 2012 3:41 PM
    Moderator
  • looks like its a bug in 2012, 



    • Edited by Jeramy_T Monday, July 30, 2012 3:32 PM
    Thursday, July 26, 2012 3:26 PM
  • we are having the exact same issue here!

    • Edited by Ray200 Wednesday, March 13, 2013 9:15 AM
    Thursday, February 28, 2013 8:09 AM
  • Hi There,

    i'm very new to this DPM and not so clued up with it. the following script are not working and give me the following error. I need to clear the existing tapes so that the new barcode range can work and not picking up as suspect tapes


    PS D:\System Centre\Microsoft System Center 2012\DPM\DPM\bin> $DPMLib = Get-DPML
    ibrary -DPMServerName "FNFHQSV011"$Tape = Get-Tape -DPMLibrary $DPMLibUnlock-DPM
    LibraryDoor -DPMLibrary $DPMLibRemove-DPMTape -DPMLibrary $DPMLib -Tape $Tape[1]

    Cannot index into a null array.
    At line:1 char:1
    + $DPMLib = Get-DPMLibrary -DPMServerName "FNFHQSV011"$Tape = Get-Tape
    -DPMLibrary ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    Monday, March 4, 2013 11:00 AM