-
- Expert
- Posts: 100
- Liked: 5 times
- Joined: Jan 14, 2014 10:41 am
- Full Name: Timo Brandt
- Contact:
Library slot management
Hi forum,
do you know of any possibiltiy to see the amount of free tape slots available in a library only by using Veeam functions given either in Veeam Backup Shell or in PowerShell?
Before importing tapes, I always need to have a look onto the tape libraries web interface whether all tapes will fit.
Thanks
do you know of any possibiltiy to see the amount of free tape slots available in a library only by using Veeam functions given either in Veeam Backup Shell or in PowerShell?
Before importing tapes, I always need to have a look onto the tape libraries web interface whether all tapes will fit.
Thanks
-
- Product Manager
- Posts: 14773
- Liked: 1719 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: Library slot management
Hello Timo,
I am not an expert, but, I believe, you can run a tape inventory via PS to check the loaded media: Start-VBRTapeInventory
I am not an expert, but, I believe, you can run a tape inventory via PS to check the loaded media: Start-VBRTapeInventory
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Library slot management
In the way I see it, it might be worth taking information regarding library free slots' directly from library, using vendor specific commandlets (if available). Thanks.
-
- Expert
- Posts: 100
- Liked: 5 times
- Joined: Jan 14, 2014 10:41 am
- Full Name: Timo Brandt
- Contact:
Re: Library slot management
Hi,
thanks Dmitry and Vladimir.
As far as I can see, getting the information through Veeam is not possible.
Using vendor commandlets will be the only option. Unfortunately it seems as if there aren't any cmdlets available.
May I ask for such a feature as a feature request?
Having an overview of all tape slots either occupied or emtpy would be nice to have.
Thanks
thanks Dmitry and Vladimir.
As far as I can see, getting the information through Veeam is not possible.
Using vendor commandlets will be the only option. Unfortunately it seems as if there aren't any cmdlets available.
May I ask for such a feature as a feature request?
Having an overview of all tape slots either occupied or emtpy would be nice to have.
Thanks
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Library slot management
Ok, your request has been heard. Just out of curiosity - what tape device are you using?
-
- Expert
- Posts: 100
- Liked: 5 times
- Joined: Jan 14, 2014 10:41 am
- Full Name: Timo Brandt
- Contact:
Re: Library slot management
Thanks. I am using Quantum Scalar tape libraries with HP drives.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Library slot management
Can't find any information regarding automation tools for the said device. However, I believe you can get number of free slots in unobvious way, using VB&R PS snap-in. Query library to get number of slots it has, then, receive list of mediums that occupy slots inside given library, after that, subtract the second number from the first one. The resulting value should be the number you're looking for.
If you struggle with scripting, kindly, create separate topic on corresponding subforum (PowerShell), and I will try to assist you with that.
Thanks.
If you struggle with scripting, kindly, create separate topic on corresponding subforum (PowerShell), and I will try to assist you with that.
Thanks.
-
- Expert
- Posts: 100
- Liked: 5 times
- Joined: Jan 14, 2014 10:41 am
- Full Name: Timo Brandt
- Contact:
Re: Library slot management
Sometimes you miss the wood for the trees...
Thanks Vladimir.
In case anyone is interested, feel free to use my small PowerShell script:
Thanks Vladimir.
In case anyone is interested, feel free to use my small PowerShell script:
Code: Select all
###########################################################################
#
# NAME: Get-VBRFreeTapeSlots
#
# AUTHOR: timmi2704
#
# COMMENT: This PS-Script will give you the free tape slots of all libraries installed in Veeam console
#
# VERSION HISTORY:
# 1.0 28.04.2015 - Initial release
#
###########################################################################
cls
#Adding Veeam PowerShell Snapin
if ((Get-PSSnapin "VeeamPssnapin" -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Adding Veeam PS Snapin..." -Foregroundcolor White
Add-PSSnapin "Veeampssnapin"
Write-Host "Completed!" -Foregroundcolor White
Write-Host ""
}
else
{
Write-Host "Veeam PS Snapin already added." -Foregroundcolor White
Write-Host ""
}
#Function for getting occupied tape librarie slots (including tapes in drives)
function Get-VBRAvailableTapes($TL) {
return Get-VBRTapeMedium -Library $TL | Where-Object { $_.Location -like 'Slot' -OR $_.Location -like 'Drive' }
}
#Getting installed tape libraries
Write-Host -ForegroundColor yellow "Getting installed tape libraries..."
$TapeLibraries = Get-VBRTapeLibrary
$TapeLibraries | Foreach-Object { Write-Host $_ }
If ($TapeLibraries -eq $null) {
Write-Host -ForegroundColor Red "No libraries found!"
pause
exit
}
Write-Host ""
#Listing online media
foreach ($TapeLibrary in $TapeLibraries) {
Write-Host -ForegroundColor Yellow -NoNewline "Listing online media for" $TapeLibrary.Name
Get-VBRAvailableTapes($TapeLibrary) | Sort-Object -property Barcode |ft -Property Barcode, Location, ExpirationDate -AutoSize
}
#Calculating free slots per librarie
foreach ($TapeLibrary in $TapeLibraries) {
$AvailableTapes = Get-VBRAvailableTapes($TapeLibrary)
$FreeSlots = ($TapeLibrary.Slots - $AvailableTapes.count)
Write-Host -ForegroundColor Yellow -NoNewline "Free slots in" $TapeLibrary.Name": "
Write-Host -ForegroundColor White $FreeSlots
}
function pause {
Write-Host "Please press RETURN to continue..."
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
pause
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Library slot management
Nice script, indeed. Thank you for sharing.
Glad to hear that my input was helpful.
Glad to hear that my input was helpful.
Who is online
Users browsing this forum: No registered users and 4 guests