Howto - Setup Iscsi Initiator Equallogic Target On Linux

October 27, 2012 | By
| Reply More
Linux DM Switch

Iscsi Linux

We are using Dell Equallogic HIT/KIT 1.2.0 version to configure iscsi target on CentOS 6.2. You can download and install the host integration tool from equallogic website.

Query host kit installation

[root@centos /]# rpm -qa | grep -i equ
equallogic-host-tools-1.2.0-1.epa.el6.x86_64
[root@centos /]#

Check ehcmd process status

[root@rhel62-eql /]# ps -ef | grep -i eh
root 2220 1 0 Oct10 ? 00:01:01 /usr/sbin/ehcmd --pidfile /var/run/ehcmd.pid
root 30257 2848 0 11:51 pts/0 00:00:00 grep -i ehcmd
[root@centos /]#

Adding the Equallogic Group

[root@centos /]# rswcli -a --gn eqltest --gip 192.168.0.1 --noping

Processing add-group-access command...

Group Name: eqltest
Group IP Address: 192.168.0.1

The add-group-access command succeeded.
[root@ centos /]#

Discover the Iscsi targets

[root@centos /]# iscsiadm -m discoverydb
192.168.0.111:3260 via sendtargets
192.168.0.120:3260 via sendtargets
192.168.0.113:3260 via sendtargets
192.168.0.120:3260 via sendtargets
192.168.0.112:3260 via sendtargets
192.168.0.111:3260 via sendtargets
192.168.0.112:3260 via sendtargets
192.168.0.110:3260 via sendtargets
192.168.0.130:3260 via sendtargets
[root@centos /]#

Display Iscsi discovered targets

[root@centos ~]# iscsiadm -m node
192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-506562a07-ceba51ba2104d70a-vss-control
192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a-testvolume
192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume
192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume
192.168.0.1:3260,1 iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume
[root@centos ~]#

Login into target

[root@centos ~]# ehcmcli login --target iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a- testvolume
Login succeeded. Device to mount:
/dev/eql/ testvolume
[root@centos ~]#

Format newly found Lun to ext4 filesystem

[root@centos ~]# mkfs.ext4 /dev/eql/ testvolume
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
66240 inodes, 264960 blocks
13248 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=272629760
9 block groups
32768 blocks per group, 32768 fragments per group
7360 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@centos ~]#

Mount to a directory

[root@centos /]# mount /dev/eql/ testvolume /data/

Display all mount points

[root@centos /]# mount
/dev/mapper/vg_rhel62eql-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/mapper/eql-0-8a0906-1186b2a07-82258e655324f82a- testvolume on /data type ext4 (rw)
[root@centos /]#

MPIO Settings

dm-switch kernel module will used to IO activity. Multipathd daemon is not required. If multipathd daemon is running make sure to disable equallogic devices (put in blacklist).

Check switch module installed. Below command shows "switch". That means it compiled into kernel.

[root@centos /]# dmsetup targets
switch v1.1.0
multipath v1.3.0
mirror v1.12.0
striped v1.4.1
linear v1.1.0
error v1.0.1
[root@centos /]#

Adding both Iscsi adapters

( Same as you can exclude other interfaces that are not in Iscsi subnet)

[root@centos /]# rswcli --mpio-include --adapter=eth1 --force

Processing mpio-include command...
Adding 'eth1' to include list
Adapter Rules:
Included:
eth1
Excluded:
All Other
Default Rules:
All other subnets, adapters or ip addresses are excluded.

The mpio-include command succeeded.

[root@centos /]#

[root@centos /]# rswcli --mpio-include --adapter=eth2 --force

Processing mpio-include command...
Adding 'eth2' to include list
Adapter Rules:
Included:
eth2
Excluded:
All Other
Default Rules:
All other subnets, adapters or ip addresses are excluded.

The mpio-include command succeeded.

[root@centos /]#

Setting number of connections, sessions and load balancing policy

[root@centos /]# rswcli -P --maxvols 2 --maxvole 6 --dlb RR --ip6

Processing mpio-parameters command...
Removed unnecessary IPv4 rules.

MPIO Parameters:

Max sessions per volume slice: 2
Max sessions per entire volume: 6
Minimum adapter speed: 1000
Default load balancing policy configuration: Round Robin (RR)
IOs Per Path: 16
Use MPIO for snapshots: Yes
Internet Protocol: IPv6

The mpio-parameters command succeeded.

New load-balancing policies will take effect on existing multipath devices in several seconds.

Display current status

[root@centos /]# ehcmcli status
Generating diagnostic data, please wait...

========================================================
Adapter List
========================================================
Name: eth2
IP Address: fe80::250:56ff:feab:6cd
HW addr: 00:50:56:AB:06:CD

Name: eth3
IP Address: fe80::250:56ff:feab:6ce
HW addr: 00:50:56:AB:06:CE

========================================================
Volume list
========================================================
Volume: testvolume
Target name: iqn.2001-05.com.equallogic:0-8a0906-1186b2a07-82258e655324f82a-testvolume
Device to mount: /dev/eql/testvolume
Status: No existing sessions found using currently configured IP protocol version
Resolution: Modify the IPv4/IPv6 settings with 'rswcli -P'.
Session: 5 /dev/sdb 192.168.0.206 -> 192.168.0.112 02:42:37
Session: 6 /dev/sdc 192.168.0.207 -> 192.168.0.111 02:42:31

========================================================
Summary
========================================================
Adapters: 2
Managed Volumes: 1
iSCSI Sessions: 2
Errors: 0
Warnings: 1
Suggestions: 0

[root@centos /]#

Filed Under : LINUX HOWTO, STORAGE

Tagged With : ,

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.