Site icon UnixArena

NetApp – Clustered DATA ONTAP – SAN – Part 14

NetApp is a unified storage. It supports both NAS and SAN protocols. SAN is a block-based storage system that uses FC, Fibre Channel over Ethernet (FCoE), and iSCSI  protocols to make data available over the network. Starting with the Data ONTAP 8.1 operating system, clustered Data ONTAP systems began supporting SANs on clusters of up to four nodes. In the Data ONTAP 8.2 operating system, SAN is supported in clusters of up to eight nodes.

 

NetApp Unified Storage

 

NetApp supports the following protocols .

  1. FC
  2. FCoE
  3. iSCSI

 

NetApp SAN Protocols

 

In Clustered Data ONTAP,

 

Typical FC Network – NetApp SAN Environment: 

There are multiple ways to connect the initiators and targets together. Which is the best? Answer: Depends on your  architectural requirements. Usually in an enterprise environment, switches are used to provide connections to the host  initiators and storage targets.

NetApp FC Network

 

Typical iSCSI Network – NetApp SAN Environment: 

NetApp iSCSI Environment

 

How to configure the iSCSI vServer and  Create the LUNs ?

1.Login to the Cluster LIF as admin user.

2.Create a new Vserver for iSCSI.

NetUA::> vserver create -vserver uaiscsi -rootvolume uaiscsi_root -aggregate NetUA01_aggr1 -ns-switch file -rootvolume-security-style unix
[Job 186] Job succeeded:
Vserver creation completed

NetUA::>

 

3. Allow only iSCSI protocol to this Vserver.

NetUA::> vserver modify -vserver uaiscsi  -allowed-protocols iscsi

 

4. Review the new dedicated iSCSI Vserver.

NetUA::> vserver show uaiscsi

                                    Vserver: uaiscsi
                               Vserver Type: data
                               Vserver UUID: f1f7f244-9dee-11e5-b3cd-123478563412
                                Root Volume: uaiscsi_root
                                  Aggregate: NetUA01_aggr1
                        Name Service Switch: file
                        Name Mapping Switch: file
                                 NIS Domain: -
                 Root Volume Security Style: unix
                                LDAP Client: -
               Default Volume Language Code: C.UTF-8
                            Snapshot Policy: default
                                    Comment:
                 Antivirus On-Access Policy: default
                               Quota Policy: default
                List of Aggregates Assigned: -
 Limit on Maximum Number of Volumes allowed: unlimited
                        Vserver Admin State: running
                          Allowed Protocols: iscsi
                       Disallowed Protocols: nfs, cifs, fcp, ndmp
            Is Vserver with Infinite Volume: false
                           QoS Policy Group: -

NetUA::>

 

5. Create a new Data LIF for “uaiscsi” SVM. List the available interface and pick the “data” role interface for iSCSI traffic.

NetUA::> net port show
  (network port show)
                                      Auto-Negot  Duplex     Speed (Mbps)
Node   Port   Role         Link   MTU Admin/Oper  Admin/Oper Admin/Oper
------ ------ ------------ ---- ----- ----------- ---------- ------------
NetUA-01
       e0a    cluster      up    1500  true/true  full/full   auto/1000
       e0b    cluster      up    1500  true/true  full/full   auto/1000
       e0c    data         up    1500  true/true  full/full   auto/1000
       e0d    data         up    1500  true/true  full/full   auto/1000
       e0e    data         up    1500  true/true  full/full   auto/1000
       e0f    node-mgmt    up    1500  true/true  full/full   auto/1000
NetUA-02
       e0a    cluster      up    1500  true/true  full/full   auto/1000
       e0b    cluster      up    1500  true/true  full/full   auto/1000
       e0c    data         up    1500  true/true  full/full   auto/1000
       e0d    data         up    1500  true/true  full/full   auto/1000
       e0e    data         up    1500  true/true  full/full   auto/1000
       e0f    node-mgmt    up    1500  true/true  full/full   auto/1000
12 entries were displayed.

NetUA::>
NetUA::> net int create -vserver uaiscsi  -lif uaiscsi1 -role data -home-node NetUA-01  -home-port e0e -address 192.168.0.131 -netmask 255.255.255.0 -data-protocol iscsi
  (network interface create)
NetUA::> net int show
  (network interface show)
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
NetUA
            cluster_mgmt up/up    192.168.0.101/24   NetUA-01      e0c     true
NetUA-01
            clus1        up/up    169.254.81.224/16  NetUA-01      e0a     true
            clus2        up/up    169.254.220.127/16 NetUA-01      e0b     true
            mgmt1        up/up    192.168.0.91/24    NetUA-01      e0f     true
NetUA-02
            clus1        up/up    169.254.124.94/16  NetUA-02      e0a     true
            clus2        up/up    169.254.244.74/16  NetUA-02      e0b     true
            mgmt1        up/up    192.168.0.92/24    NetUA-02      e0f     true
infisvm
            infisvmlif   up/up    192.168.0.124/24   NetUA-01      e0d     false
ua_vs1
            uadata1      up/up    192.168.0.123/24   NetUA-01      e0c     true
uaiscsi
            uaiscsi1     up/up    192.168.0.131/24   NetUA-01      e0e     true
10 entries were displayed.
NetUA::>
NetUA::>

 

6.configure the static route for Vserver “uaiscsi” .

NetUA::> net routing-groups route create -vserver uaiscsi   -routing-group d192.168.0.0/24 -destination 0.0.0.0/0 -gateway 192.168.0.1
  (network routing-groups route create)

NetUA::>

7.Verify the route for “uaiscsi” .

NetUA::> net routing-groups route show
  (network routing-groups route show)
          Routing
Vserver   Group     Destination     Gateway         Metric
--------- --------- --------------- --------------- ------
NetUA
          c192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     20
NetUA-01
          n192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     10
NetUA-02
          n192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     10
infisvm
          d192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     20
ua_vs1
          d192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     20
uaiscsi
          d192.168.0.0/24
                    0.0.0.0/0       192.168.0.1     20
6 entries were displayed.

8. Create the volume to provision the LUN.

NetUA::> volume create -vserver uaiscsi -volume netvol1 -aggregate NetUA01_aggr1 -size 2G
[Job 188] Job succeeded: Successful

NetUA::>

 

9. Create the new LUN on volume “Netvol1” .

NetUA::> lun create -vserver uaiscsi -volume netvol1 -lun lun0 -size 1GB -ostype linux  -space-reserve disabled

Created a LUN of size 1g (1073741824)

NetUA::>
NetUA::> lun show -vserver uaiscsi
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
uaiscsi   /vol/netvol1/lun0               online  unmapped linux         1GB

NetUA::>

We have successfully created a LUN on NetApp Storage.

 

10. Create the iSCSI target.

   
NetUA::> vserver iscsi create -vserver uaiscsi -target-alias uaiscsi -status-admin up

NetUA::> vserver iscsi show
           Target                           Target                       Status
Vserver    Name                             Alias                        Admin
---------- -------------------------------- ---------------------------- ------
uaiscsi    iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8
                                            uaiscsi                      up

NetUA::>

 

11. Create a new portset for Vserver “uaiscsi”.

NetUA::> portset create -vserver uaiscsi  -portset uaiscsips -protocol iscsi
NetUA::> portset show -vserver uaiscsi -portset uaiscsips

    Vserver Name: uaiscsi
    Portset Name: uaiscsips
        LIF Name: -
        Protocol: iscsi
 Number Of Ports: 0
Bound To Igroups: -

NetUA::>

 

12. Check the LIF name of “uaiscsi” Vserver and map the LIF to portset.

NetUA::> net int show uaiscsi1
  (network interface show)
            Logical    Status     Network            Current       Current Is
Vserver     Interface  Admin/Oper Address/Mask       Node          Port    Home
----------- ---------- ---------- ------------------ ------------- ------- ----
uaiscsi
            uaiscsi1     up/up    192.168.0.131/24   NetUA-01      e0e     true

NetUA::>
NetUA::> portset add -vserver uaiscsi -portset uaiscsips -port-name uaiscsi1
NetUA::>
NetUA::> portset show -vserver uaiscsi -portset uaiscsips

    Vserver Name: uaiscsi
    Portset Name: uaiscsips
        LIF Name: uaiscsi1
        Protocol: iscsi
 Number Of Ports: 1
Bound To Igroups: 
NetUA::>

 

13. Create a initiator group and map newly created portset “uaiscsips” to it.

NetUA::> igroup create -vserver uaiscsi -igroup uaiscsi3 -protocol iscsi -ostype linux -initiator - -portset uaiscsips
NetUA::> portset show -vserver uaiscsi
Vserver   Portset      Protocol Port Names              Igroups
--------- ------------ -------- ----------------------- ------------
uaiscsi   uaiscsips    iscsi    uaiscsi1                uaiscsi3

NetUA::>

 

14. Check the initiator groups status.

NetUA::> igroup show -vserver uaiscsi
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
uaiscsi   uaiscsi3     iscsi    linux    -

 

15. Map the LUN to initiator group.

NetUA::> lun map -vserver uaiscsi -path /vol/netvol1/lun0 -igroup uaiscsi3

NetUA::> lun show -vserver uaiscsi
Vserver   Path                            State   Mapped   Type        Size
--------- ------------------------------- ------- -------- -------- --------
uaiscsi   /vol/netvol1/lun0               online  mapped   linux         1GB

NetUA::>

 

16. Login to the Linux host and get the initiator name. (In which, you would like to provision the LUN’s)

root@uacloud:~# grep InitiatorName= /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1993-08.org.debian:01:21a0d3d79b9f
root@uacloud:~#

 

17. Add the initiator to igroup.

NetUA::> igroup add -vserver uaiscsi -igroup uaiscsi3 -initiator iqn.1993-08.org.debian:01:21a0d3d79b9f
NetUA::> igroup show -vserver uaiscsi
Vserver   Igroup       Protocol OS Type  Initiators
--------- ------------ -------- -------- ------------------------------------
uaiscsi   uaiscsi3     iscsi    linux    iqn.1993-08.org.debian:01:21a0d3d79b9f

NetUA::>

 

Configure the iSCSI initiator on Linux Host (Ubuntu):

1. Login to the Linux host.

2. Install iscsi package .

root@uacloud:~# apt-get install open-iscsi

 

3.Try to access the iSCSI target.

root@uacloud:~# iscsiadm -m discovery -t st -p 192.168.0.131
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: cannot make connection to 192.168.0.131: Connection refused
iscsiadm: connection login retries (reopen_max) 5 exceeded
iscsiadm: Could not perform SendTargets discovery: encountered connection failure
root@uacloud:~#

IP Address – NetApp Vserver LIF . (Refer step 12).

If you are not configured the portset and initiator target group properly, you may get errors like above.
(iscsiadm: cannot make connection to IP_Address: Connection refused)

If you have configured correctly,you can see like following.

root@uacloud:~# iscsiadm -m discovery -t st -p 192.168.0.131
192.168.0.131:3260,1030 iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8
root@uacloud:~#

 

4.Login to the iSCSI target using the following command.

root@uacloud:~# iscsiadm -m node --targetname "iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8"  --portal "192.168.0.131:3260" --login
Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8, portal: 192.168.0.131,3260] (multiple)
Login to [iface: default, target: iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8, portal: 192.168.0.131,3260] successful.
root@uacloud:~#

–targername – Refer step 10
Portal – NetApp Vserver LIF . (Refer step 12).

 

5. If you assign the new LUN’s to the existing target , you can scan the iSCSI connection using following commands.

root@uacloud:~# iscsiadm -m session
tcp: [6] 192.168.0.131:3260,1030 iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8
root@uacloud:~# iscsiadm -m session --sid=6 --rescan
Rescanning session [sid: 6, target: iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8, portal: 192.168.0.131,3260]

Or use the following to re-scan all the iSCSI session.

root@uacloud:~# iscsiadm -m session --rescan
Rescanning session [sid: 6, target: iqn.1992-08.com.netapp:sn.f1f7f2449dee11e5b3cd123478563412:vs.8, portal: 192.168.0.131,3260]
root@uacloud:~#

 

6.Use the fdisk command to find the new disks.

 

7. In my case, it is /dev/sdc.

root@uacloud:~# fdisk -l /dev/sdc 
Disk /dev/sdc: 1073 MB, 1073741824 bytes
34 heads, 61 sectors/track, 1011 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 65536 bytes
Disk identifier: 0x00000000

We have successfully provisioned the NetApp iSCSI LUN to Linux host.

Hope this article is informative to you. Share it ! Comment it !! Be Sociable !!!

Exit mobile version