Unsolved
This post is more than 5 years old
7 Posts
0
5384
Navicli command to find the orphan Luns
Hi All,
I'm looking for a navicli or naviseccli command to find the Luns luns whish is not connected to any of the hosts , in other words Orphans luns not connected to any of the storage groups.
kelleg
4.5K Posts
0
May 31st, 2011 12:00
There is no CLI command that will list the LUNs that are not assigned to a host. You can use the "storagroup -list" command - that will list each LUN that is in a storage group. But this will not tell you if a LUN is free (not assigned to a host) or Private (reserver LUNs, metaLUN component LUNs).
You may be able to get this from the GUI reports, but have not tried that.
glen
I7Q4cjPsny12559
7 Posts
0
May 31st, 2011 15:00
Thanks Kelleg ,
Is there any other way to generate unmasked Luns , using some script ot Navisphere manager ?
Storagesavvy
474 Posts
0
May 31st, 2011 15:00
I found this in the NaviCLI Command Line Reference guide..
naviseccli -h
206.229.9263
I7Q4cjPsny12559
7 Posts
0
May 31st, 2011 16:00
Thanks Richard,
could you pls provide the complete comand with syntax ?
Storagesavvy
474 Posts
0
May 31st, 2011 17:00
I thought I included that in the previous email…
A full complete command with login data would be…
Naviseccli –user getunusedluns
I’ve never used the command, I just found it in the CLI guide.
Richard J Anderson
kelleg
4.5K Posts
0
June 1st, 2011 09:00
I missed that completely - it works - from my lab array
naciseccli -h IP_address_SPA getunusedlungs
RAID GROUP: 1
LUN 1
RAID GROUP: 0
LUN 3
glen
PS - learn something new every day
dynamox
1 Rookie
1 Rookie
•
20.4K Posts
0
June 1st, 2011 17:00
yes, you can create an admin password file ...that's encrypted, take a look navisecli admin guide.
I7Q4cjPsny12559
7 Posts
0
June 1st, 2011 17:00
Thanks Once again Richard ,
The commands works fine for me but the issue is the user id & password, Is there a way to encrypt the userid & Password so that no one could see the actual password .Security is a major concern here , I tried to Google on the same without any luck .
I7Q4cjPsny12559
7 Posts
0
June 1st, 2011 18:00
Thanks Richard ,
I've one more issue with the command , it gives you the Lun Name not the Lun id , what I'm looking here to find the unused Lun and its capacity .
Storagesavvy
474 Posts
0
June 1st, 2011 18:00
Yep, the detail on creating a security file is on page 37 of the Navisphere CLI Reference for version 7.30.
Richard J Anderson
umichklewis_ac7b91
300 Posts
0
June 1st, 2011 19:00
This sounds like a scripting project to me. This would be a terribly-easy Perl script to get the LUN ID of all unused LUNs, dump into a temporary array, then get the LUN capacity with another NaviSecCLI command. If you want a real challenge, write the same thing in PowerShell.
Gouda2
20 Posts
0
June 21st, 2011 12:00
this is what I wrote
for($i=1; $i-le $count41; $i++)
{
$str=$UnusedLuns41[$i]
$str1=$str.trimstart("LUN ")
$WriteTofile = naviseccli -h $cxip getlun $str1 -name -capacity
Add-Content C:\Govind-Storage\psscripts\FreeLun.log $WriteTofile
but the thing is that I am getting the Capacity in two types. Block and MB. Is there any way we can get the capacity in MB or block alone.
Gouda2
20 Posts
0
June 21st, 2011 12:00
hi,
thanks lot. I have got the output what i expected. I currently get this report in poweshell and then populate the Free lus for the Next Free Lun.
Again thanks
I7Q4cjPsny12559
7 Posts
0
June 27th, 2011 18:00
Thanks Gouda ,
It was a great help.
Cheers
Anil
I7Q4cjPsny12559
7 Posts
0
June 27th, 2011 20:00
Thanks Everyone .