Red Hat Linux iSCSI Installation

How to configure Red Hat Linux for iSCSI Storage Use

Helpful Hint

Follow these instructions before filling out the IP Storage Request Form.

  1. Install iSCSI Initiator Utils

    # sudo yum install iscsi-initiator-utils
    
    
  2. Install Device Mapper Multipath

    # sudo yum install device-mapper-multipath
    
    
  3. Edit /etc/multipath.conf: It should contain the following:

    # Blacklist all local devices
    devnode_blacklist {
            devnode "sd[a-b]$"
            devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
            devnode "^hd[a-z]"
            devnode "^cciss!c[0-9]d[0-9]*"
    }
    
    ## Use user friendly names, instead of using WWIDs as names.
    defaults {
            user_friendly_names yes
    }
    
    devices {
            device {
                    vendor                  "NETAPP"
                    product                 "LUN"
                    path_grouping_policy    multibus
                    getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
                    prio_callout            "/sbin/mpath_prio_ontap /dev/%n"
                    features                "1 queue_if_no_path"
                    path_checker            directio
                    failback                immediate
                    flush_on_last_del       yes
            }
    }
    
    
    
  4. Start multipathd:

    # sudo /sbin/service multipathd start
    
    
  5. Configure mutlipathd to start at boot:

    # sudo /sbin/chkconfig multipathd on
    
    
  6. Edit /etc/iscsi/initiatorname.iscsi: There may be some warnings in the file about editing the file, but don't worry. The key thing is the name you use must be unique to the iSCSI device you are connecting to. There should only be one line that is not commented out in the file. More than likely, it will look something like this:

    InitiatorName=iqn.1994-05.com.redhat:28cdd2240a5
    
    

    Change the part afer the ":" to be linux-"yourdnsname", where yourdnsname is the fully qualified DNS name of your machine. For example:

    InitiatorName=iqn.1994-05.com.redhat:linux-case.doit.wisc.edu
    
    
  7. Edit /etc/iscsi/iscsi.conf: Edit the following options or just add them to the end of the file if they are already commented out:

    node.session.auth.username = username
    node.session.auth.password = password
    discovery.sendtargets.auth.username = username
    discovery.sendtargets.auth.password = password
    
    
  8. Start iSCSI:

    sudo /sbin/service iscsi start
    
    
  9. Configure iSCSI to start at boot:

    # sudo /sbin/chkconfig iscsi on
    
    
  10. Discover the target:

    # sudo /sbin/iscsiadm -m discovery -t sendtargets -p 144.92.227.74 (Check with DoIT for the correct IP Address to use)
    
    

    Note:

    • Other iSCSI targets

      iscsi1.doit.wisc.edu (144.92.227.74 - cipnet1a)
      iscsi2.doit.wisc.edu (144.92.227.75 - cipnet1b)
      iscsi5.doit.wisc.edu (144.92.227.82 - cnetapp4a)
      iscsi6.doit.wisc.edu (144.92.227.83 - cnetapp4b)

  11. Fill out the IP Storage Request Form
  12. When the LUN is ready, restart iSCSI to pic up the new LUN:

    sudo /sbin/service iscsi restart
    
    



Keywords:Red Hat redhat Linux iSCSI Installation Netapp IP Storage Tier 4   Doc ID:15607
Owner:Steve W.Group:Systems Engineering
Created:2010-11-15 19:00 CDTUpdated:2011-08-15 10:00 CDT
Sites:DoIT Help Desk, Systems Engineering
Feedback:  5   0