Additional information:
- product name: DSS V7
- product version: all versions
- build: all builds
Subject:
Setup Linux (Debian / Ubuntu) box with iSCSI and MPIO to connect to an iSCSI Tartget in DSS V7
Contents:
- Install and configure Linux box with 3 NICs
- Run below commands in terminal:
Then run the following to refresh the repositories database:
Install the open-iscsi, multipath-tools and editing tool of choice (mcedit, nano, vi):
Set up both NICs eth1 and eth2 on Linux box:
Set up both NICs eth1 and eth2 on DSSv7:
On DSSv7, create the iSCSI logical volume and attach it to iSCSI target.
On Linux box run command to discover iSCSI targets:
Both commands should return similar output:
where iqn.2012-07:dss.target0 is target name.
On Linux box, login to iSCSI targets:
You should now see two new disk in fdisk -l (sdb and sdc).
Run the multipath -ll command and you should get something like this:
where 2356932543730786e is Worldwide Identifier of the disk.
Create and or edit the file from /etc/multipath.conf using the editor:
/etc/multipath.conf:
where the wwid is the Worldwide Identifier is the value you got from multipath -ll command.
Restart the multipath tools:
and now multipath -ll should output should be similar to the one above:
you should now see new unit in fdisk -l:
Lets perform some testing.
a) Open a second console we will use this to monitor dataflow and login and run following command:
b) Now test and watch the dataflow on a second console. This test checks the writting - watch the TX bytes counters run in different console:
c) Now test and watch the dataflow on a second console. This test checks the read test - watch the RX bytes counters run in different console:
d) Now we formatt and mount the volume
e) While copying data using the Midnight Commander we will see the data flow from the command that we issued in the past steps.
f) In case you want an immediate (or after specified time) path failure detection edit the /etc/iscsi/iscsid.conf file and find entry:
which specifies the length of time to wait for session re-establishment before failing SCSI commands back to the application when running the Linux SCSI Layer error handler. The value is in seconds and the default is 120 seconds and set it to 0 or in case your network may occur short interruption some higher value like 5.
There are also some other entries that should be modified:
It is strongly recommended to play with these values before going into production as they have impact on the time after the the traffic will be switched to other left path(s) after path(s) failure.
After modifying the /etc/iscsi/iscsid.conf file you should umount the iscsi target (if mounted) and restart both iscsi and multipath: