I am working with scripts to build out a Unity array in the same manner that you can do a VNX (bind LUNs, create/populate Storage Groups, name LUNs, etc.). One thing I have not found is a way to actually "add" a LUN to a host. The manual shows how to change the HLU or show the details, but actually adding a LUN to a host seems to be missing. Can someone point me at the propper syntax?
This question was first asked when we were only at Unity 4.1 code.
Since Unity 4.2 and above, you can do this with a host command (instead of the LUN command) already: The "uemcli /remote/host set" command has these options: [ -addLuns ] [ -removeLuns ]
If you are on old code (please upgrade) or need to use the LUN set command for some reason, then yes, if you use the LUN set command, you need to specify all the hosts that this LUN will be mapped to.
If you only specify the new host, all others are implicitly removed.
When using /remote/host set -addLuns with vmfs datastores do you use the lun names (as in sv_1, sv_2) or the friendly names you have named your vmfs? I'm guessing you use the names provided by /remote/host show -detail in the Accessible LUNs field which would be sv_x. The guide says to use friendly names but 1) I don't think that's correct and 2) I don't find sv_x very friendly.
Use friendly names, at least for creating vmfs style LUNs, for instance I used the below command to create a VMFS LUN named DC1-Exch01_L1 and provision it to Host 19 & 20 (which are the CLI ID which you can get from the GUI or CLI, I did not try this with friendly host names). This has let me use Excel to concatenate a bunch of text to create commands to build and provision the 60 LUNs for our build, then repeat this in our second location. Much better than using the GUI (IMHO)
AndreD Dell
Moderator
•
239 Posts
7170
0
Posted March 27th, 2017 06:00
Forgot to add:
This can also be achieved with RestAPI.