problem automating the mounting of the tape library
Posted: 16 Jun 2011, 01:57
I am running DPM 2010 and using FireStreamer with great success. My only issue is, if I don't remember to manually unlock the tape door, mount the tape cartridge, and re-lock the tape door, I don't have a backup. Here's my attempt to automate the process - everything works but the actual FireStreamer tape mount - can anyone shed some light on this?
Remoting in and mounting the tapes on Saturday morning and dismounting them after the backup completes is getting to be a hassle - I've got to automate! (this is PowerShell)
Rob
PS C:\> # load firestreamer library
PS C:\> [System.Reflection.Assembly]::LoadFrom("c:\Program files\Cristalink\FsChanger\FirestreamerInterface.dll")
GAC Version Location
--- ------- --------
False v2.0.50727 c:\Program files\Cristalink\Fschanger\firestreamerInterface.dll
PS C:\> $FireTape = New-Object -TypeName Firestreamer.Driver.Controller
PS C:\> $FireTape.Connect
PS C:\> # find all DPM libraries
PS C:\> $AllLibraries = get-dpmlibrary -dpmservername candpm |where-object {$_.ProtectionGroups -ne ""}
PS C:\> # unlock DPM tape library door for all libraries
PS C:\> Unlock-DPMLibraryDoor -DPMLibrary $AllLibraries
Message
-------
Door has been unlocked for library Firestreamer Media Changer.
PS C:\> # load firestreamer tape library
PS C:\> $libraryNumber = 1
PS C:\> $mapfile = "F:\MediaMap.fsmap"
PS C:\> $FireTape.ChangerLoadMediaFromfile($libraryNumber,$mapfile)
The following exception occurred while retrieving member "ChangerLoadMediaFromfile": "Could not load file or assembly '
CristalinkNUtl' or one of its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)"
At line:1 char:35
+ $FireTape.ChangerLoadMediaFromfile <<<< ($libraryNumber,$mapfile)
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember
PS C:\> # lock library door
PS C:\> Lock-DPMLibraryDoor -DPMLibrary $AllLibraries
Message
-------
Door has been locked for library Firestreamer Media Changer.
PS C:\>
Remoting in and mounting the tapes on Saturday morning and dismounting them after the backup completes is getting to be a hassle - I've got to automate! (this is PowerShell)
Rob
PS C:\> # load firestreamer library
PS C:\> [System.Reflection.Assembly]::LoadFrom("c:\Program files\Cristalink\FsChanger\FirestreamerInterface.dll")
GAC Version Location
--- ------- --------
False v2.0.50727 c:\Program files\Cristalink\Fschanger\firestreamerInterface.dll
PS C:\> $FireTape = New-Object -TypeName Firestreamer.Driver.Controller
PS C:\> $FireTape.Connect
PS C:\> # find all DPM libraries
PS C:\> $AllLibraries = get-dpmlibrary -dpmservername candpm |where-object {$_.ProtectionGroups -ne ""}
PS C:\> # unlock DPM tape library door for all libraries
PS C:\> Unlock-DPMLibraryDoor -DPMLibrary $AllLibraries
Message
-------
Door has been unlocked for library Firestreamer Media Changer.
PS C:\> # load firestreamer tape library
PS C:\> $libraryNumber = 1
PS C:\> $mapfile = "F:\MediaMap.fsmap"
PS C:\> $FireTape.ChangerLoadMediaFromfile($libraryNumber,$mapfile)
The following exception occurred while retrieving member "ChangerLoadMediaFromfile": "Could not load file or assembly '
CristalinkNUtl' or one of its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)"
At line:1 char:35
+ $FireTape.ChangerLoadMediaFromfile <<<< ($libraryNumber,$mapfile)
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : CatchFromBaseGetMember
PS C:\> # lock library door
PS C:\> Lock-DPMLibraryDoor -DPMLibrary $AllLibraries
Message
-------
Door has been locked for library Firestreamer Media Changer.
PS C:\>