Free Open Isci tool is used as the iscsi initiator on the client. Once installed, you can use iscsiadm command to configure the lun on linux. Here I am trying to use EqualLogic Isci storage as the target and a Redhat Linux 5 as the client. First, you should create volumes on the storage group interface manager and then needs to maps those Luns to server. You need to mention either iscsi initiator name or IP address to map the Lun to the server(host). If you need any authentication you can use chap. Now you can move to Linux host for further iscsi configuration.
Check isci initiator installed or not
You need iscsi-initiator-utils-6.2.0.742-0.6.el5 or greater
# rpm -qa | grep -i iscsi
iscsi-initiator-utils-6.2.0.872-10.el5
Display interfaces details
Lets check interface ip details
# ifconfig -a | more
eth0 Link encap:Ethernet HWaddr 00:50:56:AB:00:E7
inet addr:172.28.*.* Bcast:172.28.12.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2503 errors:0 dropped:0 overruns:0 frame:0
TX packets:838 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:196784 (192.1 KiB) TX bytes:98212 (95.9 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:AB:00:E8
inet addr:172.28.*.* Bcast:172.28.40.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4237 errors:0 dropped:0 overruns:0 frame:0
TX packets:3807 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:966177 (943.5 KiB) TX bytes:359247 (350.8 KiB)
eth2 Link encap:Ethernet HWaddr 00:50:56:AB:01:00
inet addr:172.28.*.* Bcast:172.28.40.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4387 errors:0 dropped:0 overruns:0 frame:0
TX packets:3960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:894415 (873.4 KiB) TX bytes:384013 (375.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:660 (660.0 b) TX bytes:660 (660.0 b)
Creating the interface files for MPIO
Lets use iscsiadm command to create interface files for multipathing
# iscsiadm -m iface -I eth1 -o new
New interface eth1 added
# iscsiadm -m iface -I eth2 -o new
New interface eth2 added
Updating the interface name for each port
Run iscsiadm command to update interface name
# iscsiadm -m iface -I eth1 -o update -n iface.net_ifacename -v eth1
eth1 updated.
# iscsiadm -m iface -I eth2 -o update -n iface.net_ifacename -v eth2
eth2 updated.
# cat /var/lib/iscsi/ifaces/eth1
# BEGIN RECORD 2.0-872
iface.iscsi_ifacename = eth1
iface.net_ifacename = eth1
iface.transport_name = tcp
# END RECORD
# cat /var/lib/iscsi/ifaces/eth2
# BEGIN RECORD 2.0-872
iface.iscsi_ifacename = eth2
iface.net_ifacename = eth2
iface.transport_name = tcp
# END RECORD
Iscsi target Discovering
Detect lun using iscsiadm command
# iscsiadm -m discovery -t st -p 172.28.*.*:3260
172.28.*.*:3260,1 iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel
172.28.*.*:3260,1 iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel
Logging into target
You have option to login individually also.
# iscsiadm -m node -l
Logging in to [iface: eth2, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260]
Logging in to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260]
Logging in to [iface: eth1, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260]
Login to [iface: eth2, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260] successful.
Login to [iface: default, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260] successful.
Login to [iface: eth1, target: iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel, portal: 172.28.*.*,3260] successful.
Display scsi attached device
Lets display detected lun devices
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi7 Channel: 00 Id: 00 Lun: 00
Vendor: EQLOGIC Model: 100E-00 Rev: 5.2
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi6 Channel: 00 Id: 00 Lun: 00
Vendor: EQLOGIC Model: 100E-00 Rev: 5.2
Type: Direct-Access ANSI SCSI revision: 05
Iscsi session details
Below command will display session details of isci
# iscsiadm -m session
tcp: [6] 172.28.*.*:3260,1 iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel
tcp: [7] 172.28.*.*:3260,1 iqn.2001-05.com.equallogic:0-8a0906-a146b2a07-57858e634784f7b0-bobrhel
Display Disk details
Below command will display linux disk details that are known to kernel.
# fdisk -l
Disk /dev/sda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 574 4610623+ 83 Linux
/dev/sda2 575 652 626535 82 Linux swap / Solaris
Disk /dev/dm-0: 1085 MB, 1085276160 bytes
255 heads, 63 sectors/track, 131 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/sde: 1085 MB, 1085276160 bytes
34 heads, 61 sectors/track, 1022 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Disk /dev/sde doesn't contain a valid partition table
Disk /dev/sdf: 1085 MB, 1085276160 bytes
34 heads, 61 sectors/track, 1022 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Disk /dev/sdf doesn't contain a valid partition table
Checking whether Equallogic Hit installed
I have already installed HIT Kit 1.0.0- #rpm –ivh equallogic-host-tools-1.0.0-1.el5.x86_64.rpm
# rpm -qa | grep -i equa
equallogic-host-tools-1.0.0-1.el5
Hit requires dkms 1.95 (Dynamic kernel module support) installed. ( I have already installed dkms - #rpm –ivh dkms-1.95.32-1.noarch.rpm )
# rpm -qa | grep -i dkms
dkms-1.95.32-1
Dkms module can be download from http://linux.dell.com/dkms/testing/permalink/
Restarting EHCMD service
If using dell multipath module
# /etc/init.d/ehcmd restart
Stopping ehcmd: [FAILED]
Starting ehcmd: [ OK ]
Restarting Multipath deamon
You can set alias, uuid, device details, blacklist node in multhipath.conf file before restarting
# /etc/init.d/multipathd restart
Stopping multipathd daemon: [FAILED]
Starting multipathd daemon: [ OK ]
Display multhipath details
# multipath -ll
Bob_rhel_lun () dm-0 EQLOGIC,100E-00
[size=1.0G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=2][enabled]
\_ 3:0:0:0 sdc 8:32 [active][ready]
\_ 1:0:0:0 sdd 8:48 [active][ready]
Device mapper target device status
# dmsetup ls --target=multipath
Bob_rhel_lun (253, 0)
Mounting the filesystem
I have already formatted the filesystem using mkfs command (mkfs.ext3 /dev/mapper/Bob_rhel_lun)
# mount /dev/mapper/Bob_rhel_lun /data
Display disk usage
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.3G 2.7G 1.5G 66% /
tmpfs 502M 0 502M 0% /dev/shm
/dev/mapper/Bob_rhel_lun 1019M 34M 934M 4% /data
Persistence on reboot
Added mount point to fstab file
# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
/dev/mapper/Bob_rhel_lun /data ext3 defaults 0 0