How to Create a LUN on NetApp from CLI
- Monday, February 14, 2011, 9:14
- NetApp, Storage
- Add a comment
|
|
Before creating LUN (Logical Unit Number)on a NetApp filer the appropriate license needs to be added.Connect to the netapp through the console or a remote session.Before creating LUN,we need to know which volume this LUN will reside.Use vol status command to list the available volumes
fas2020> vol status
If we have the required volume name then we can create LUN with following commnad
lun create -s “size” -t “type” “volumename/lun number”
fas2020>lun create -s 300g -t linux /vol/vol2/lun2
Successful execution of this command wil create LUN “/vol/vol2/lun2” .Then we need to map this LUN with particular host with IQN(ISCSI).For that we need to create Initiator group or igroup which contain the IQN for host.
fas2020>igroup create -i -t linux test_group iqn.1994-05.com.redhat:65ca50822cf9
After creating igroup, we need to map it with following commnand.
lun map “lun name” “igroup name” “lun number”
fas2020>lun map /vol/vol2/lun2 test_group lun2
So mapping has done.Now verify it, lun show -m will show LUN list and their mapping.This will give following output
fas2020>lun show -m
LUN path Mapped to LUN ID Protocol
——————————————————————————-
/vol/vol2/lun2 test_group 2 iSCSI
We will see how to connect host to this LUN in next article.


