A quick guide to setup IP SAN using Linux-Netapp-iscsi.

On Linux server :

  1. Install iSCSI initiator (iscsi-initiator-utils rpm) on your linux machine. This will create the necessary binaries and will create /etc/iscsi.conf and /etc/initiatorname.iscsi
  2. Add iscsi-iname to /etc/initiatorname.iscsi .

    [root@unixfoo ~]# iscsi-iname
    [root@unixfoo ~]#

    Add the output to /etc/initiatorname.iscsi

  3. Add the below lines to /etc/iscsi.conf


    DiscoveryAddress should be the IP address of the storage.

On Netapp filer :

  1. Make sure you have iscsi license enabled.
  2. Create volume for holding the iscsi luns.

    filer1> vol create iscsivol aggr01 100g

  3. Create lun on the volume

    filer1> lun create -s 50g -t linux /vol/iscsivol/lun1

  4. Create an igroup and add the Linux iscsi-iname to it.

    filer1> igroup create -i -t linux iscsigrp
    filer1> igroup add iscsigrp iqn.1987-05.com.cisco:01.44c65d9587d9
    filer1> igroup show
        iscsigrp (iSCSI) (ostype: linux):
            iqn.1987-05.com.cisco:01.44c65d9587d9 (logged in on: iswta)

  5. Map the lun to the iscsi-group.

    filer1> lun map /vol/iscsivol/lun1 iscsigrp 0

  6. Enable only one interface for iscsi use and disable others

    filer1> iswt interface disable e7
    filer1> iswt interface show
    Interface e0 disabled
    Interface e4 enabled
    Interface e5 disabled
    Interface e7 disabled

  7. Done on the Netapp side.

On Linux again :

  1. Start iscsi initiator

    [root@unixfoo ~]# /etc/init.d/iscsi start
    Checking iscsi config:                                     [  OK  ]
    Loading iscsi driver:                                      [  OK  ]
    Starting iscsid:                                           [  OK  ]
    [root@unixfoo ~]#

  2. Set iscsi initiator to start automatically after reboot.

    [root@unixfoo ~]# chkconfig  iscsi on

  3. Check whether the iscsi lun shows up on the linux machine.

    [root@unixfoo ~]# iscsi-ls
    SFNet iSCSI Driver Version …4:0.1.11-3(02-May-2006)
    TARGET NAME             : iqn.1992-08.com.netapp:sn.50380528
    TARGET ALIAS            :
    HOST ID                 : 2
    BUS ID                  : 0
    TARGET ID               : 0
    TARGET ADDRESS          :,2
    SESSION STATUS          : ESTABLISHED AT Sat Dec 29 21:55:37 PST 2007
    SESSION ID              : ISID 00023d000001 TSIH 501

    LUN ID : 0
      Vendor: NETAPP   Model: LUN              Rev: 0.2
      Type:   Direct-Access                    ANSI SCSI revision: 04
      page83 type3: 60a980004f6444662653053584516d34
      page80: 4f6444516d344305358066265a
      Device: /dev/sdb

    [root@unixfoo ~]#

  4. Now you have a new device in your linux box (/dev/sdb) – that is your iscsi device. You can create filesystem on it and use it.
  5. Done!
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
Read More

Netapp VIFs loadbalancing

NetApp loadbalancing algorithm for determining ethernet load balancing (vifs) differs from Cisco, so it’s normal to see unbalanced…