Start a Conversation

Unsolved

This post is more than 5 years old

Y

10026

January 13th, 2012 09:00

LUN create via NAVICLI

I found the below in documentation

lun -create [-type Thin|nonThin]

-capacity capacity [-sq mb|gb|tb|bc]

-poolId storagePoolID |-poolname storagePoolName -sp SPID

[-aa autoAssignment]

[-l lunNumber]

[-name lunName]

I want to be able to have the script pick up the SP it will belong to just like the GUI does.

Is it possible?

I am currently specifying the SP but am afraid that it might result in me adding too many volumes to one SP.

I have tried -aa option but it errors out for me. I am missing something here.

1 Rookie

 • 

20.4K Posts

January 15th, 2012 21:00

you don't want to enable auto assignment anyway, you set it only when your host does not have any multipathing software. Are you creating a bunch of LUNs at once or this is for one here one there type of provisioning ?

134 Posts

January 16th, 2012 05:00

I am trying to write a script which I can hand over to the UNIX group and they can assign the boot disk for new builds with out having to wait for us.

Currently I have it set up in a way that all new luns are created on sp a.

1 Rookie

 • 

20.4K Posts

January 16th, 2012 06:00

i see. You will need to add some logic to your script to first get a LUN count on each SP and then alternate which SP you specify during LUN creation.

January 16th, 2012 11:00

If it is UNIX it is easy to create script for NAVICLI  LUN create

If ur already having Raid groups then you can mention only that as a fixed variable and rest all u can amke it as user input variables

Example command is : naviseccli -h 10.186.59.213 bind r5 2999 -rg 2 -cap 60 -noinitialverify -sp A

You will have to create a function to call variable lunNumber,lunName,storagePoolID  and Capacity

You need call all these variables as inputsave

Like Let lunNumber = input('Enter Lun Number : ')

134 Posts

January 16th, 2012 11:00

I will look for a command which will give me the lun count on each SP.

After that looks like a simple if else loop.

Thanks all

4.5K Posts

January 24th, 2012 12:00

I recommand that you do not script for Pool LUNs. You really want the array to pick the SP assignment for Pool LUNs. This ensures that the LUN will be placed on the SP best suited for any new LUNs.

glen

1 Rookie

 • 

20.4K Posts

January 24th, 2012 12:00

Glen Kelley wrote:

I recommand that you do not script for Pool LUNs. You really want the array to pick the SP assignment for Pool LUNs. This ensures that the LUN will be placed on the SP best suited for any new LUNs.

glen

and how is "best suited" determined ?

4.5K Posts

January 24th, 2012 15:00

best suited is the way the array looks at all the resources in the Pool and determines where the new LUN should go (SP owner) based on the availability of the underlying LUNs for new slices - it tries to balance the loading on the LUNs base on capacity and ownership of the underlying LUNs.

glen

134 Posts

January 25th, 2012 05:00

This is ONLY going to be for boot luns. Any other disks will be performed via GUI and letting the array pick the SP.

Is there a way in command line which would allow the array to pick the LUN owner? If so that would be my priority.

Our server guys are trying to build 50 hosts at 1 time. This could get really tedious if we can not script.

I have not done it yet but I am all set to run lun create alternatively between SP's.

134 Posts

January 25th, 2012 06:00

You think it is a bad idea even if it were only for boot luns?

4.5K Posts

January 25th, 2012 12:00

When you say "boot LUNs" do you mean "boot-from-san" - the you have a disless workstation that is using a LUN on the array to boot from? Or is this one of those ESX things where you start a VM and it "boot"?

If you are NOT using Pool LUNs, then you can use CLI to create new LUNs, but you still must specify which SP will own the LUN at the time you issue the command. What some people do if using Raid Groups (not Pools) is to have two scripts, one to create LUNs owned by SPA and the other to create LUNS owned by SPB. Then if you want to create 20 LUNs in a single Raid Group - you create 10 on SPA and 10 on SPB. You need one bind command for each LUN. In the GUI, you can create multiple LUNs at one time - just give a starting LUN ID and the rest are assigned automatically.

glen

134 Posts

January 27th, 2012 07:00

By boot luns I mean "boot-from-san" -  the diskless lpar that uses LUN from array to boot and we are using thin pool and not raid-groups.

Currently my script counts the number of luns on each SP and creates a disk on which ever SP has less count.

134 Posts

January 31st, 2012 13:00

it is odd that GUI has a feature that CLI can not perform. That is Unusual. Isnt GUI supposed to be a subset of CLI?

1.3K Posts

April 14th, 2012 09:00

GUI is more often used than CLI and hence the reseach and developmens may be more on GUI side  , IMHO; Also allocating LUNs just based on the number of LUN may not be the best all the time. because the load on the SP still may vary based on what load is coming to individuals LUN.  Me , personally look at the SP trends on monthly  basis and make the LUN owner decision based on that.

5 Practitioner

 • 

274.2K Posts

August 4th, 2015 06:00

use ( -aa 1)

example:

NaviSECCli.exe -h spa_IP -user sysadmin -password sysadmin -scope 0 lun -create -type NonThin/Thin -aa 1 -capacity 2 -sq tb -poolId 1  -name Lun_name

No Events found!

Top