Naviseccli Commands To Create VNX LUN

In this post, we will discuss naviseccli commands to create VNX LUN. Naviseccli is a software that you can install on Unix or Linux server and use that server for managing any VNX from a command-line interface.

You can use naviseccli for every management operation through the command line, including LUN creation, storage group creation, assigning LUNs to storage group, and many more.

Get the complete guide for Naviseccli commands.

List Naviseccli Commands To Create VNX LUN

Below are complete steps of LUN provisioning in EMC VNX.

Step 1. Connect to SPA or SPB of VNX.
Step 2. Create a LUN.
Step 3. Create a storage group.
Step 4. Assign the registered host to the storage group.
Step 5. Assign the LUNs to the storage group.

You can automatically generate naviseccli commands from here.

Step 1. Connect to SPA or SPB of VNX

You can connect to the SPA or SPB of the VNX storage using its IP address or FQDN. You must have the user name and password of the storage array. Make sure you use the correct scope, else the command will fail.

ScopeUser Type
0Global
1Local
2LDAP

naviseccli -h SP-IP -user username -password password -scope 0 -AddUserSecurity

AddUserSecurity option allows you to execute the next command without providing the username and password. Hence, the next commands will not have any user name and password.

Step 2. Create a LUN In naviseccli

Now you need to create a LUN using the below command. Below naviseccli command creates a thin LUN of 100GB from a storage pool. The LUN number is 10 which is also known as the ALU.

The -aa 1 assigns the LUN is either SPA or SPB. If you need to assign a LUN to a particular SP, then instead of -aa use -sp and give a value A or B.

naviseccli -h SP-IP lun -create -type Thin -cpacity 100 -sq gb -poolname poolname -aa 1 -l 10 -name LUN10

Step 3. Create a storage group.

The next, step is to create a storage group in VNX. A storage group contains LUNs and initiators. An initiator can only access LUN if they are part of the same storage group.

Below naviseccli commands creates a storage group “Production”.

naviseccli -h SP-IP storagegroup -create -gname Production

Step 4. Assign the initiator host to the storage group.

The next step is to assign an initiator to the storage group. You must first, complete the zoning between the initiator’s WWPN and VNX front end ports.

You can list out the connected host using below commands.

navicli -h SP-IP port -list -hba

Now, the below commands assign all initiators of server “ServerABC” to a VNX storage group “Production”.

naviseccli -h SP-IP storagegroup -connecthost -o -host ServerABC -gname Production

Step 5. Assign the LUNs to the storage group.

The final step is to assign LUNs to the storage group. Below naviseccli command assigns a LUN having a LUN number 10 to storage group Production.

Here, HLU stands for host LUN unit, which is used by a host to recognize LUNs in the host. You must provide a unique HLU number to a LUN within a storage group.

naviseccli -h SP-IP storagegroup -addhlu -gname Production -hlu 20 -alu 10

Conclusion

Finally, to list out the storage group information, you can use the below naviseccli command.

naviseccli -h ss1_spa storagegroup -list -gname Production

Price Based Country test mode enabled for testing India. You should do tests on private browsing mode. Browse in private with Firefox, Chrome and Safari