Red Hat Linux iSCSI Installation
Helpful Hint
Follow these instructions before filling out the IP Storage Request Form.
Install iSCSI Initiator Utils
# sudo yum install iscsi-initiator-utils
Install Device Mapper Multipath
# sudo yum install device-mapper-multipath
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 } }
Start multipathd:
# sudo /sbin/service multipathd start
Configure mutlipathd to start at boot:
# sudo /sbin/chkconfig multipathd on
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
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
Start iSCSI:
sudo /sbin/service iscsi start
Configure iSCSI to start at boot:
# sudo /sbin/chkconfig iscsi on
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)
- Fill out the IP Storage Request Form
When the LUN is ready, restart iSCSI to pic up the new LUN:
sudo /sbin/service iscsi restart