HPE Storage Users Group

A Storage Administrator Community




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Getting LUN numbers using Powershell and the 3PAR toolkit
PostPosted: Wed Dec 14, 2016 4:01 pm 

Joined: Tue Jul 12, 2016 1:50 pm
Posts: 10
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
}


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting LUN numbers using Powershell and the 3PAR toolki
PostPosted: Fri Dec 16, 2016 7:09 am 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
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.

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting LUN numbers using Powershell and the 3PAR toolki
PostPosted: Mon Dec 19, 2016 6:48 pm 

Joined: Tue Jul 12, 2016 1:50 pm
Posts: 10
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Getting LUN numbers using Powershell and the 3PAR toolki
PostPosted: Thu Dec 29, 2016 10:06 am 
Site Admin
User avatar

Joined: Tue Aug 18, 2009 10:35 pm
Posts: 1328
Location: Dallas, Texas
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.

_________________
Richard Siemers
The views and opinions expressed are my own and do not necessarily reflect those of my employer.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group | DVGFX2 by: Matt