Get-VBRTapeLibrary not working in PS script

PowerShell script exchange

Get-VBRTapeLibrary not working in PS script

Veeam Logoby GPSC » Fri Jan 16, 2015 5:29 am

Hi folks,
I have tried searching on the VBRTapeLibrary term but got no results.

Case # 00727523

Anyway I have a short script that just gets the local tape library then inventories it prior to backup commencing.

When I try to run this script I get the following error:

Code: Select all
Get-VBRTapeLibrary | Start-VBRTapeInventory
Get-VBRTapeLibrary : Changer not found (libraryId: 8f3e9b02-09e3-48c2-9918-b7f8bb8e4d56).
At line:1 char:1
+ Get-VBRTapeLibrary | Start-VBRTapeInventory
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRTapeLibrary], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeLibrary



This used to run fine prior to going to Version 8. We are currently patched to the latest version (Version 8 patch 1 from memory?) License is Veeam B&R Enterprise. I spotted something like this issue being fixed in the latest Release Notes.

Veeam server is a Dell R720XD with a SAS Dell TL2000 library. (Both been restarted as requested by support but no change).
We can do a manual inventory of the library via the Veeam UI just fine, the library backs up and restored properly. The issue seems to be the Powershell component of Veeam.
I can find the library fine in the Veeam UI. We can also see the tape server in PS ok:
Code: Select all
PS C:\SCRIPTS> Get-VBRTapeServer

ServerId    : 3ec80cca-f651-4770-a78b-388fe5355d89
IsAvailable : True
Id          : 268cab57-4ee2-4dd2-b7f3-2a634b3aed36
Name        : 127.0.0.1
Description : Created by XXXX\xxx at 19/12/2014 9:29 AM.

ServerId    : 6745a759-2205-4cd2-b172-8ec8f7e60ef8
IsAvailable : True
Id          : 211506cf-960f-40a0-832e-6550a14c8c9e
Name        : Local Tape Server
Description : Created during db update from 7.0




Has anybody come across this before? It's not a massive issue but a nuisance.
GPSC
Novice
 
Posts: 4
Liked: 1 time
Joined: Fri Jan 16, 2015 5:03 am

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby v.Eremin » Fri Jan 16, 2015 9:25 am

How many libraries exist in your environment? Have you tried to get a specific library, using either name or ID parameter, and only then inventory it?

Code: Select all
Get-VBRTapeLibrary -name "Name of your Library" | Start-VBRTapeInventory


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby GPSC » Sun Jan 18, 2015 9:37 pm

Hi there,

We have a single library. I haven't tried inventorying using a specific name or ID.

I tried that and got this message:
Code: Select all
Get-VBRTapeLibrary -name "IBM 3573-TL C.30" | Start-VBRTapeInventory
Get-VBRTapeLibrary : Changer not found (libraryId: 8f3e9b02-09e3-48c2-9918-b7f8bb8e4d56).
At line:1 char:1
+ Get-VBRTapeLibrary -name "IBM 3573-TL C.30" | Start-VBRTapeInventory
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRTapeLibrary], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeLibrary


I am using the name as supplied by Veeam in the Tape Infrastructure\Libraries UI. I'm not sure how to get the name of the library any other way.

Thanks for your help so far. :)
GPSC
Novice
 
Posts: 4
Liked: 1 time
Joined: Fri Jan 16, 2015 5:03 am

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby v.Eremin » Mon Jan 19, 2015 9:42 am

You can run Get-VBRTapeLibrary without any additional parameters to get list of all libraries:

Code: Select all
Get-VBRTapeLibrary


Then, after having seen the list, select an appropriate library with the use of -name parameter:

Code: Select all
Get-VBRTapeLibrary -name "Name of your library"


Finally, inventory the required device:

Code: Select all
Get-VBRTapeLibrary -name "Name of your library" | Start-VBRTapeInventory

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby GPSC » Tue Jan 20, 2015 9:44 pm

Thanks for your reply, sorry I was away from work yesterday. In the meantime the ticket escalated to L2 and the tech has identified that there may be an orphaned tape library in the config DB. He's working on a resolution now.

To answer your question when I run Get-VBRTapeLibrary without any switches I get this:
Code: Select all
PS C:\SCRIPTS> Add-PSSnapin VeeamPSSnapin

PS C:\SCRIPTS> Get-VBRTapeLibrary
Get-VBRTapeLibrary : Changer not found (libraryId: 8f3e9b02-09e3-48c2-9918-b7f8bb8e4d56).
At line:1 char:1
+ Get-VBRTapeLibrary
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VBRTapeLibrary], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.GetVBRTapeLibrary
 

PS C:\SCRIPTS>


Thanks for your help. It is appreciated.
GPSC
Novice
 
Posts: 4
Liked: 1 time
Joined: Fri Jan 16, 2015 5:03 am

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby v.Eremin » Wed Jan 21, 2015 10:04 am 1 person likes this post

The described behaviour doesn't look normal. The provided example should list all the connected devices without any issues. So, the root cause might be related to some obsolete references present inside product database, indeed.

Keep working with the support team on addressing that, and update the topic, once the resolution is found.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby GPSC » Wed Jan 21, 2015 8:59 pm 1 person likes this post

Hi there, yes it was a problem probably due to the V7-V8 upgrade.
We gave the tech a copy of the config DB and he identified some tables referring to the library ID 8f3e9b02-09e3-48c2-9918-b7f8bb8e4d56. This GUID for the library must have been orphaned somehow during the upgrade.

He gave us some queries to run to drop those references and then the inventory ran as expected from PS script.

Thanks for your help while we got this sorted!
GPSC
Novice
 
Posts: 4
Liked: 1 time
Joined: Fri Jan 16, 2015 5:03 am

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby v.Eremin » Thu Jan 22, 2015 9:49 am

So, our assumption was correct. Thank you for finding time and updating the topic with the resolution; appreciated!
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get-VBRTapeLibrary not working in PS script

Veeam Logoby prajendram » Thu Jan 22, 2015 10:46 pm 1 person likes this post

I am running V8. Every time I run Start-VBRTapeInventory the Veeam does "Tape library Cataloging" not "Tape library Inventory". Can someone explain why?
I am trying to do inventory using the Get-VBRTapeServer -Name "Local Tape Server" | Get-VBRTapeLibrary | Start-VBRTapeInventory and the veeam is doing Cataloging function.
prajendram
Lurker
 
Posts: 1
Liked: 1 time
Joined: Thu Jan 22, 2015 10:36 pm
Full Name: Paul Rajendram


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests