HPE 3PAR StoreServ Storage
1752577 Members
4342 Online
108788 Solutions
New Discussion

Re: scripted export VLUNs (createvlun)

 
SOLVED
Go to solution
3padm
Advisor

scripted export vluns

Hi,

We have a 3par 7400 and plan to add additional esxi hosts to the fabric which all require to have the same vluns and lun IDs as the existing servers in the environment. Is there a way to genarate a cli command to grab the host to vlun relationship then export this info to the new hosts again using cli?

I realise this can be done with host sets but we cannot use this as Vmware SRM does not like them.

Thanks

4 REPLIES 4
Sheldon Smith
HPE Pro

Re: scripted export vluns

See the "showvlun -host <hostname>" command in the HP 3PAR CLI Reference Manual.

 

There are a number of options for the commands listed in the HP 3PAR CLI Administrator's Guide to format the output in a script-friendly fashion. For example, "-csvtable" to output in comma-separated format rather than human-friendly tables.

 

 

Note: While I work for HP, all of my comments (whether noted or not), are my own and are not any official representation of the company.

----------

If my post was useful, click on my KUDOS! "White Star" !


Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

3padm
Advisor

Re: scripted export vluns

Hi,

 

That is exactly what im looking for! Having looked at the reference doc, I cannot find the commands to export the vluns to new host, woudl this be using setvv by any chance.

 

Here is an output from your command

Lun VVName        HostName                     -Host_WWN/iSCSI_Name- Port Type
  0 VLUN1         esx-003 ----------------       --- host
  1 VLUN2         esx-003 ----------------       --- host
  2 VLUN3         esx-003 ----------------       --- host
  3 VLUN4         esx-003 ----------------       --- host
  4 VLUN5         esx-003 ----------------       --- host

 

what would the syntax be to say export these VLUNS to esx-010 ? And would it be safe to run the commands one after another or would you do one, check host in Vcenter and move onto next?

 

Thanks!

Sheldon Smith
HPE Pro

Re: scripted export vluns

Assign them all and scan once. Read the Concepts, Admin guide, and CLI reference.

 

createvlun -f VLUN1 0 esx-010

...


Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the company

Accept or Kudo

Dennis Handly
Acclaimed Contributor
Solution

Re: scripted export VLUNs (createvlun)

>what would the syntax be to say export these VLUNs to esx-010?

>createvlun -f VLUN1 0 esx-010

 

If they are all in order like that, you can export them in one go by creating a VV set:

createvvset esx_vvset VLUN1 VLUN2 VLUN3 VLUN4 VLUN5

createvlun -f set:esx_vvset 0 esx-010