DM Multipath With Openfiler ISCSI Storage
DM Multipath With Openfiler ISCSI Storage
DM Multipath With Openfiler ISCSI Storage
Openfiler. For this, we need: 1. Openfiler Host with 2 NICs 2. RHELX.Y Host with 2 NICs Note: We require the 2 NICs for multipathing. Here we are using Oracle VirtualBox for hosting the above 2 Hosts. Setup of Openfiler: Eth0: 192.168.1.4 Eth1: 192.168.1.5
Page 1
Page 2
Page 3
Page 4
New
Update
Setup of RHEL Host: Eth0: 192.168.1.6 Eth1: 192.168.1.7 Install RHELX.Y and ensure that iscsi-initiator-utils package and device-mapper-multipath package are installed. Initial Output of fdisk l [root@vm1 ~]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot /dev/sda1 * /dev/sda2 /dev/sda3 Start 1 14 145 End Blocks Id System 13 104391 83 Linux 144 1052257+ 82 Linux swap / Solaris 1958 14570955 8e Linux LVM
Now, we discover the iSCSI targets: [root@vm1 ~]# /etc/init.d/iscsid start Starting iSCSI daemon [root@vm1 ~]# chkconfig --level 35 iscsid on [root@vm1 mnt]# iscsiadm -m discovery -t sendtargets -p 192.168.1.5 192.168.1.5:3260,1 iqn.2006-01.com.openfiler:tsn.44fb8032e9cf 192.168.1.4:3260,1 iqn.2006-01.com.openfiler:tsn.44fb8032e9cf Restart iscsid service and re-run fdisk l to see the available iscsi shared partition. [root@vm1 ~]# /etc/init.d/iscsid restart Stopping iSCSI daemon: [ OK ] Starting iSCSI daemon: [ OK ]
[ OK ]
Page 5
RHEL Multipathing with OpenFiler iSCSI Storage [root@vm1 ~]# fdisk -l Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Start 1 14 145
End 13 144
Disk /dev/sdb: 536 MB, 536870912 bytes 17 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 1037 * 512 = 530944 bytes Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 536 MB, 536870912 bytes 17 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 1037 * 512 = 530944 bytes Disk /dev/sdc doesn't contain a valid partition table
Now, we setup Multipathing: [root@vm1 ~]# scsi_id -g -u -s /block/sdc 14f504e46494c45524c5a6d6731532d42346a362d34324d35 [root@vm1 ~]# scsi_id -g -u -s /block/sdb 14f504e46494c45524c5a6d6731532d42346a362d34324d35
Page 6
RHEL Multipathing with OpenFiler iSCSI Storage Now, edit /etc/multipath.conf #blacklist { # #} multipaths { multipath { wwid alias } 14f504e46494c45524c5a6d6731532d42346a362d34324d35 iscsi-a devnode "*"
[root@vm1 ~]# service multipathd start Starting multipathd daemon: [root@vm1 ~]# fdisk -l [ OK ]
Disk /dev/sda: 16.1 GB, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Start 1 14 145
End 13 144
Disk /dev/sdb: 536 MB, 536870912 bytes 17 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 1037 * 512 = 530944 bytes
Disk /dev/sdc: 536 MB, 536870912 bytes 17 heads, 61 sectors/track, 1011 cylinders Units = cylinders of 1037 * 512 = 530944 bytes
Disk /dev/dm-5: 536 MB, 536870912 bytes 255 heads, 63 sectors/track, 65 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-5 doesn't contain a valid partition table
[root@vm1 ~]# multipath -ll iscsi-a (14f504e46494c45524c5a6d6731532d42346a362d34324d35) dm-5 OPNFILER,VIRTUAL-DISK [size=512M][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 9:0:0:0 sdb 8:16 [active][ready] \_ round-robin 0 [prio=1][enabled] \_ 10:0:0:0 sdc 8:32 [active][ready]
[root@vm1 ~]# multipath -ll sdc: checker msg is "readsector0 checker reports path is down" iscsi-a (14f504e46494c45524c5a6d6731532d42346a362d34324d35) dm-5 OPNFILER,VIRTUAL-DISK [size=512M][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 9:0:0:0 sdb 8:16 [active][ready] Page 8
RHEL Multipathing with OpenFiler iSCSI Storage \_ round-robin 0 [prio=0][enabled] \_ 10:0:0:0 sdc 8:32 [active][faulty]
[root@vm1 ~]# multipath -ll | grep failed \_ 10:0:0:0 sdc 8:32 [failed][faulty]
When the path is later restored, then the output is: [root@vm1 ~]# multipath -ll iscsi-a (14f504e46494c45524c5a6d6731532d42346a362d34324d35) dm-5 OPNFILER,VIRTUAL-DISK [size=512M][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 9:0:0:0 sdb 8:16 [active][ready] \_ round-robin 0 [prio=1][enabled] \_ 10:0:0:0 sdc 8:32 [active][ready]
Page 9