Currently Being Moderated
lwei

How to Create an iSCSI LIF?

Posted by lwei in Pseudo Benchmark on Jan 15, 2013 9:11:33 PM

In Serving Data in Cluster-Mode (Clustered ONTAP) blog post, I used FCP as an example to demonstrate how to create a LIF. What if you want to use iSCSI instead of FCP? Then, you need to create an iSCSI LIF. And here are the steps.


Assumption: we have a two-node cluster established; and a VServer is already created.


Add iSCSI license

      

You can add the iSCSI license using the “license add <iSCSI license code>” command. Then, use “license show” to verify the step is successful.

 

f3240-sqltest::> license show

(system license show)

Feature Cluster SN   Limit Description

------- ------------ ----- ------------------

Base    1-80-000011  999   Base License w/cluster size limit (nodes)

iSCSI   1-80-000011  999   iSCSI License

FCP     1-80-000011  999   FCP License

3 entries were displayed.

 

Ensure iSCSI protocol is allowed

   

If the Vserver does not allow the iSCSI protocol, you will get an error when you attempt to create the iSCSI service.

 

f3240-sqltest::vserver> iscsi create

Error: command failed: The protocol iscsi is not allowed to run on Vserver Vserver.

 

You can modify the Vserver to add iSCSI to the “allowed-protocols” list, and verify that iSCSI is indeed allowed, as shown below.

   

f3240-sqltest::> vserver modify -vserver Vserver -allowed-protocols fcp, iscsi

f3240-sqltest::> vserver show Vserver

  Vserver: Vserver

  Vserver Type: cluster

  Vserver UUID: aad95eb8-455e-11e2-b438-123478563412

  Root Volume: root_vol

  Aggregate: aggr1

  Name Service Switch: file

  Name Mapping Switch: file

  NIS Domain: -

Root Volume Security Style: ntfs

  LDAP Client: -

  Language: en_US

  Snapshot Policy: default

  Comment:

Anti-Virus On-Access Policy: default

  Quota Policy: default

List of Aggregates Assigned: aggr1, aggr2

Limit on Maximum Number of Volumes allowed: unlimited

  Vserver Admin State: running

  Allowed Protocols: fcp, iscsi

  Disallowed Protocols: nfs, cifs

Is Repository Vserver: false

 

Create iSCSI service

   

Now, you can create the iSCSI service on the Vserver and it’ll be successful.


f3240-sqltest::> iscsi create

f3240-sqltest::> iscsi show

        Target                               Target                      Status

Vserver Name                                 Alias                       Admin

---------- -------------------------------- ---------------------------- ------

Vserver  iqn.1992-08.com.netapp:sn.aad95eb8455e11e2b438123478563412:vs.3

                                             Vserver                     up

 

Create iSCSI LIF

 

Next, you use the command “create -lif…” to create an iSCSI LIF.

   

f3240-sqltest::network interface> create -lif iscsi_lif -vserver Vserver -role data -data-protocol iscsi -home-node f3240-sqltest-01 -home-port e0a -address 192.168.10.11 -netmask 255.255.255.0

f3240-sqltest::network interface> show

            Logical    Status     Network            Current       Current Is

Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home

----------- ---------- ---------- ------------------ ------------- ------- ----

Vserver

            iscsi_lif    up/up    192.168.10.11/22   f3240-sqltest-01

                                                                   e0a     true

. . .

 

To carry this example one step further, let’s go to a Windows box and establish an iSCSI session. On the Windows host, use the iSCSI tool to discover target and do Quick Connect, as shown in Fig. 1 below.

blog_2013jan15_fig1.PNG

Figure 1. Establishing an iSCSI session between a Windows host and the Vserver.

   

You can also view the iSCSI session on the cluster by using the command “iscsi session show”.

 

f3240-sqltest::> iscsi session show

                         Initiator              Initiator

Vserver Name      TSIH   Name                   ISID       Alias

--------- ------- ---- ------------------------ --------- ---------------------

Vserver iscsi_lif    4 iqn.1991-05.com.microsoft:win-p2dlovigj8q

                                                40:00:01:37:00:00

                                                           -

 

Note, the above command also displays the iSCSI Initiator Name (in red), which is required while creating an iSCSI igroup. To serve data to the Windows host using the iSCSI LIF, all you need to do is to map a LUN to the iSCSI igroup.

 

Thanks for reading.

Comments

Filter Blog

By date:
By tag: