Installation Instructions: The initiator is actually a kernel module that is already available with the appropriate CentOS Linux

installation. To use and manage the initiator, you need to install the iSCSI utilities. Notes: *Do not use the version that comes on the CentOS v5.0 install CDs. That version, iscsi-initiatorutils- does not work with the EqualLogicarray. You can find targets but not connect to them. You need version iscsi-initiator-utils- or greater. *CentOS 5.0 requires at least one iSCSI HBA and one GbE NIC to do multipathing. *You will need CentOS 5.1 or greater to take advantage of multipathing with GbE NICs. This requires version iscsi-initiator-utils- or greater.
# yum install iscsi-initiator-utils

Once installed, run: # service iscsi start To verify that the iSCSI service will be started at boot time, the chkconfig command can be used as follows: # chkconfig –list iscsi iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off By default, the newly added iscsi initiator is not enabled at boot, which is the reason for each of the run levels listed to have the service set to off. To enable this at boot, again use the chkconfig command as follows: # chkconfig –add iscsi # chkconfig iscsi on The above two commands first checks to be sure there are the necessary scripts to start and stop the service, and then it sets this service to be enabled for the appropriate runlevels. Then check to be sure the changes took effect: # chkconfig –list iscsi iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off You also need to do the same for the Multipath daemon.

com.2001-05.10.23.equallogic:0-8a0906-83bcb3401-16e0002fd0a46f3dcentos-test The example shows that the ‘centos-test’ volume has been found but not yet logged in.2001-05.10. Logging into Targets Here are two ways to connect to iSCSI targets : ( #man iscsiadm for other methods) Log into all targets.23.240:3260 172.# chkconfig –list multipathd multipathd 0:off 1:off 2:on 3:on 4:on 5:on 6:off Discovering Targets: Once you have the iscsi service running you will use the ‘iscsiadm’ utility to # iscsiadm -m node -l -T -l -p :3260 Example: # iscsiadm -m node -l -T iqn. # iscsiadm -m node -l Log into an individual target. login and logout of targets.240:3260.equallogic: 83bcb3401-16e0002fd0a46f3d-centos-test -p :3260 Checking Session Status: To see the connection status run: # iscsiadm -m session -i Sample output: . To get a list of available targets type: # iscsiadm -m discovery -t st -p :3260 Example: # iscsiadm -m discovery -t st -p 172.1 iqn.

and do not guarantee that a device (i.iscsiadm version Portal Group Tag: 1 Network Portal: 172. except.2001-05. and provides a reference point for it that does not change at reboot.equallogic:0-8a0906-83bcb3401-16e0002fd0a46f3dcentos-test -p :3260 Persistent Device naming: Devices using the Red Hat software initiators do not have a persistent naming scheme. First you have to comment out the ‘Blacklist all devices’ section in /etc/multipath.240:3260 iSCSI Connection State: LOGGED IN Internal iscsid Session State: NO CHANGE ************************ Negotiated iSCSI params: ************************ HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 65536 MaxXmitDataSegmentLength: 65536 FirstBurstLength: 65536 MaxBurstLength: 262144 ImmediateData: Yes InitialR2T: No axOutstandingR2T: 1 ************************ Attached SCSI devices: ************************ Host Number: 2 State: running scsi2 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running Logging off a target: It’s the same as logging into a target.0-742 ************************************ Session (sid 1) using module tcp: ************************************ TargetName: iqn.23.e.2001-05. that you use -u instead of -l # iscsiadm -m node -u -T iqn. Persistent Naming describes mechanisms where the system identifies devices without relying on the /dev /dev/sdc) will always have the same device node.conf file Note: .

multipath. friendlier name.synthetic /etc/multipath. # multipath -v2 # multipath -ll mpath0 (36090a01840b3bc833d6fa4d02f00e016) dm-2 EQLOGIC. Edit the /etc/multipath.100E-00 [size=8.If the example file.conf is not in /etc.conf file and uncomment out the following: . That never changes.synthetic and edit it as below # cp /usr/share/doc/device-mapper-multipath-0.conf 1 # Blacklist all devices by default.4. Again edit the /etc/multipath. Remove this to enable multipathing 2 # on the default devices. copy it from /usr/share/doc/device-mappermultipath-0.0G][features=0][hwhandler=0] \_ round-robin 0 [prio=1][active] \_ 2:0:0:0 sdb 8:16 [active][ready] The highlighted number is the UUID of the volume.7/multipath. 3 # blacklist { 4# devnode "*" 5 #} Then restart the multipathd daemon # service multipathd restart Now check that dev-mapper has configured the volume.7/multipath. Remove this to enable multipathing 2 # on the default devices. You can use that UUID to create a persistent.conf.conf file. 3 blacklist { 4 devnode "*" 5} So it should look like this: 1 # Blacklist all devices by default.4.conf. Uncomment the following section and change the defaults to match your UUID and set a friendly alias name. For example you can name it the same as you called the volume on the EQL array.

01 #multipaths { 02 # multipath { 03 # 04 # 05 # 06 # 07 # 08 # 09 # 10 # 11 # 12 # 13 # 14 # 15 # 16 # 17 #} } multipath { wwid 1DEC_____321816758474 alias red } wwid 3600508b4000156d700012000000b0000 alias yellow path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" failback manual rr_weight priorities no_path_retry 5 rr_min_io 100 Change the number after wwid to the UUID for your volume. then run: . 01 multipaths { 02 multipath { 03 04 05 06 07 08 09 10 11 12 13 # 14 # 15 # 16 # 17 } } multipath { wwid 36090a01840b31c74e173a4873200a02f alias svr-vol } wwid 36090a02830f251891f74744263735281 alias centos-test path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" failback manual rr_weight priorities no_path_retry 5 r rr_min_io 10 Save the file. Here’s an example showing how to do more than one volume. Change the alias to something more friendly or use the volume name from the array. Change the rr_min_io to 10.

100E-00 [size=10G][features=0][hwhandler=0] \_ round-robin 0 [prio=0][enabled] \_ 6:0:0:0 sdb 8:16 [active][ready] # ls -l /dev/mapper total 0 crw-rw—. Example: # mke2fs -j -v /dev/mapper/centos-test Mounting iSCSI Filesystems at Boot: In order to mount a filesystem that exists on an iSCSI Volume connected through the Linux iSCSI Software initiator.# multipath -v2 # multipath -ll centos-test (36090a02830f251891f74744263735281) dm-1 EQLOGIC. you need to add a line to the /etc/fstab file.100E-00 [size=100G][features=1 queue_if_no_path][hwhandler=0] \_ round-robin 0 [prio=0][active] \_ 9:0:0:0 sdc 8:48 [active][ready] svr-vol (36090a01840b31c74e173a4873200a02f) dm-0 EQLOGIC. Now create a EXT3 filesystem on that device. The format of this line is the same as any other device and filesystem with the exception being that you need to specify the _netdev mount option. 63 2007-11-16 17:15 control brw-rw—.defaults 0 0 . 0 2007-11-19 15:58 svr-vol You should now have a persistent name to access that volume.1 root disk 254. and you want to have the last two numbers set to 0 (first is a dump parameter and the second is the fsck pass).1 root disk 254.1 root root 10. 1 2007-11-19 15:59 centos-test brw-rw—. An example of an /etc/fstab line for a filesystem to be mounted at boot that exists on an iSCSI Volume is as follows: /dev/mapper/centos-test /mnt/centos-test ext3 _netdev. The _netdev option delays the mounting of the filesystem on the device listed until after the network has been started and also ensures that the filesystem is unmounted before stopping the network subsystem at shutdown.

g.2001-05.equallogic: 0-8a0906-83bcb3401-16e0002fd0a46f3dcentos-test You should see an entry for each interface you specified. #iscsiadm -m discovery -t st -p :3260 172. #iscsiadm -m node -l -T iqn. if you are going to use Then edit the MAC address to reflect the MAC address of the ETH1 adapter. You then edit the file and add in the MAC address of the ETH0 adapter.eth0 file to /var/lib/iscsi/ifaces/iface.1 iqn.10.90:3260.hwaddress Example: iface.2001-05. E.eth0 looks like: To bind by hardware address set the NIC’s MAC address to iface.23. You'll need to log into the volume.equallogic:0-8a0906-8951f2302-815273634274741fcentos-test -p :3260 .ethX’ file in /var/lib/iscsi/ifaces.equallogic: 0-8a0906-83bcb3401-16e0002fd0a46f3dcentos-test 172.hwaddress = 00:50:56:97:70:70 Repeat for the other ports you wish to use.10.1 iqn. You will have to create the ‘iface.90:3260. If you have already discovered your volumes. you now need to re-discover the target(s).com.Configuring Mulitpath Connections: To create the multiple logins needed for Linux dev-mapper to work you need to create an ‘interface’ file for each GbE interface you wish to use to connect to the array. then copy the /var/lib/iscsi/ifaces/ You can get the MAC address with the following command: #ifconfig eth0 | grep HW eth0 Link encap:Ethernet HWaddr 00:50:56:97:70:70 The MAC address in this case is: 00:50:56:97:70:70 Here’s an example of what the /var/lib/iscsi/ifaces/iface.

10.100E-00 [size=100G][features=1 queue_if_no_path][hwhandler=0] \_ round-robin 0 [prio=0][active] \_ 9:0:0:0 sdd 8:48 [active][ready] \_ 8:0:0:0 sde 8:64 [active][ready] dw-svr-vol (36090a01840b31c74e173a4873200a02f) dm-0 EQLOGIC.2001-05. To check for Flow Control (RX/TX Pause) on your iqn.23.10. #multipath -v2 #multipath -ll dw-test-vol (36090a02830f251891f74744263735281) dm-1 EQLOGIC.1 iqn. To do this.equallogic: 0-8a0906-83bcb340116e0002fd0a46f3d-centos-test This shows that both adapters have connected to the array. Verify that the multipathing is correctly configured. use the ethtool utility on Red Hat.23. use the -a option as follows: # ethtool -a Example: # ethtool -a eth0 Pause parameters for eth0: Autonegotiate: on .100E-00 [size=10G][features=0][hwhandler=0] \_ round-robin 0 [prio=0][enabled] \_ 6:0:0:0 sdb 8:16 [active][ready] \_ 7:0:0:0 sdc 8:32 [active][ready] In this example you see that there are two paths to each -m session tcp: [3] 172.2001-05. Linux NIC Configuration: Flowcontrol Be sure that the network interfaces are configured to use Flow Control and Jumbo Frames if supported.90:3260.equallogic: 0-8a0906-83bcb340116e0002fd0a46f3d-centos-test tcp: [4] 172.

this change will revert back to the default on a system reboot.5 Mb) TX bytes:55551 (54. First.0. As we can see from the above output.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:236410 errors:0 dropped:0 overruns:0 frame:0 TX packets:272 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:40458683 (38. show the current setting for the interface in question using the ifconfig command using the interface name as an argument: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0E:0C:70:C9:63 inet addr:172. For these NICs.19. see the manufacturer of the NIC for steps to configure the Flow Control setting for the NIC. using ethtool will not persistently set this variable.51. or simply add the ethtool command to the end of the /etc/rc. The majority of GbE NICs will detect and enable flowcontrol properly For Jumbo Frames.2 Kb) Base address:0xdca0 Memory:dfca0000-dfcc0000 The setting we are interested in is the MTU value. you can use the ifconfig utility to make the change on a running interface.RX: off TX: off Set Flow Control to on using the -A parameter with ethtool as follows: # ethtool -A [rx|tx] on Example: # ethtool -A eth0 rx on tx on # ethtool -a eth0 Pause parameters for eth0: Autonegotiate: on RX: on TX: on For some NICs.d/rc.255. we need to set the mtu again using the ifconfig command as follows: # ifconfig eth0 mtu 9000 .160 Bcast:172. To change this.255.19. this is currently set to 1500 which is not a Jumbo packet size. Unfortunately.255 Mask:255.local file to set Flow Control for rx and tx to on.

255 Mask:255.51. you need to add the MTU="" parameter to the end of the ifcfg startup scripts for your SAN interfaces.7 Kb) TX bytes:123065 ( .0 ONBOOT=yes TYPE=Ethernet USERCTL=no PEERDNS=yes GATEWAY=172.255 IPADDR=172.160 NETMASK= you should reboot the host to verify that they have been made correctly and that the settings are persistent.19. A sample output of one of these files after adding the MTU line to the file should be similar to the following # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none BROADCAST=172.0 UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1 RX packets:3007 errors:0 dropped:0 overruns:0 frame:0 TX packets:813 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:415532 (405.1 Kb) Base address:0xdca0 Memory:dfca0000-dfcc0000 To make this setting persistent.1 MTU="9000" Once the above Network changes have been made. Bcast:172.19.# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0E:0C:70:C9:63 inet addr:172.how2centos.0 NETWORK=172.19. http://www. The naming format of the cfg files for your interfaces is ifcfg-. These are found in the /etc/sysconfig/network-scripts directory.0.

Sign up to vote on this title
UsefulNot useful