Hi,
To make our lives easier I was looking to extract the LUN numbers for a given selection of virtual volumes but there appears to be some inconsistancy on when LUN numbers are available. If I run the powershell script below I only get LUN numbers for virtual volumes that were not part of a virtual set and and not exported to s host set.
Does anybody have any ideas how to get a complete list of LUN numbers?
$vv_list = Get-3parVV | Select name | Where-Object {$_.name -Like "xyz*"}
foreach ($vv_item in $vv_list)
{
$vv_name = $vv_item.name
$vv_lun = (Get-3parVLUN -vvName $vv_name).LunID
Write-Host $vv_name $vv_lun
}
Getting LUN numbers using Powershell and the 3PAR toolkit
-
- Posts: 10
- Joined: Tue Jul 12, 2016 1:50 pm
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
Re: Getting LUN numbers using Powershell and the 3PAR toolki
I don't have the 3PAR powershell component loaded... but the normal non-powershell 3PAR cli command showvlun works to show LUN# for both hosts and host sets, I was not able to test it for volume sets, but I suspect it also works as intended.
Can you explain the problem you are trying to solve with this scipt? Its not clear to me, but I think it may be that my deployment uses a VV naming convention that includes the LUN# in the VV name, and we've planned it such that if a VV is to be exported to multiple hosts, it will be the same LUN# on all hosts.
Can you explain the problem you are trying to solve with this scipt? Its not clear to me, but I think it may be that my deployment uses a VV naming convention that includes the LUN# in the VV name, and we've planned it such that if a VV is to be exported to multiple hosts, it will be the same LUN# on all hosts.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
-
- Posts: 10
- Joined: Tue Jul 12, 2016 1:50 pm
Re: Getting LUN numbers using Powershell and the 3PAR toolki
The issue that I am trying to solve is that we also have LUN's that are exported to multiple hosts and we are stepping on ourselves. It sounds like a great idea to include the LUN as part of the VV name but now we need to get a list of all the LUN numbers that have already been assigned.
- Richard Siemers
- Site Admin
- Posts: 1333
- Joined: Tue Aug 18, 2009 10:35 pm
- Location: Dallas, Texas
Re: Getting LUN numbers using Powershell and the 3PAR toolki
showvlun command will do what you need.
It can show you all the luns assign to a host, or show you all the LUNs assigned to a VV.
using the -pathsum option will condense the output down to 1 LUN# per host, instead of showing a line for each path to the same host.
It can show you all the luns assign to a host, or show you all the LUNs assigned to a VV.
using the -pathsum option will condense the output down to 1 LUN# per host, instead of showing a line for each path to the same host.
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.
The views and opinions expressed are my own and do not necessarily reflect those of my employer.