IT Knowledge Base

Technical Repository

HowTo: Configure RedHat for ISCSI SAN Access

Install iSCSI Initiator Utils, Install Device Mapper Multipath and lsscsi

# sudo yum install iscsi-initiator-utils
# sudo yum install device-mapper-multipath
# sudo yum install install lsscsi

Find the name of the initiator server in the file /etc/iscsi/initiatorname.iscsi. In this example, the name of the server is iqn.

# cat /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.1994-05.com.redhat:46bf8e2794f

Let’s change the initiator name to something that includes the hostname of the server.

# nano /etc/iscsi/initiatorname.iscsi

Comment out the default name and create a new line with the new name and restart the iscsi service.

#InitiatorName=iqn.1994-05.com.redhat:46bf8e2794f
InitiatorName=inq.1994-05.com.redhat:SRVMYHOST01.DOMAIN.LOCAL
service iscsi restart

Configure the iscsi and multipath service to start on boot

# sudo chkconfig iscsi on
# sudo chkconfig multipathd on

Discover the target:

# sudo iscsiadm -m discovery -t sendtargets -p 10.10.10.10

Result:

10.10.10.10:3260,1 iqn.2003-10.com.lefthandnetworks:demo-sandemo01:31503:SRVMYHOST01-DATA01
10.10.10.10:3260,1 iqn.2003-10.com.lefthandnetworks:demo-sandemo01:31501:SRVMYHOST01-LOGS01

When the LUN is ready, restart iSCSI to pic up the new LUN:

# service iscsi restart

Create mount points

# mkdir /mnt/VOL01

# mkdir /mnt/VOL02

# mount /dev/sdc /mnt/VOL01
# mount /dev/sdb /mnt/VOL02



Leave a Reply