logoSolaris Multipathing

I will explain the necessary steps to perform Solaris iSCSI Multipathing. Using the multipathing will enable a second (or more) paths to the SAN environment, in which, two simultaneous disk requests can be services with separate "paths" to the SAN. This increases speed in busy environments and provides failover when a link is severed.

Contents

[hide]

Initial Setup

You will have to add at least two NICs into the iSCSI environment.

Setting up NICs

For the first iSCSI NIC, edit the /etc/hostname.<nic><instance> file to reflect the following:

vi /etc/hostname.<nic>
-----Add-----
<IP> netmask <Netmask> broadcast <Broadcast> group <groupname> up


On the second NIC, add this line:

vi /etc/hostname.<other nic>
-----Add-----
group <groupname> up


Real Worl Example of NIC Setup

So a "Real World example of this would be:

vi /etc/hostname.vmxnet3s1
-----Add-----
192.168.133.120 netmask 255.255.255.0 broadcast 192.168.133.255 group grp1 up


...and the other nic would be:

vi /etc/hostname.vmxnet3s2
-----Add-----
group grp1 up

Reboot

It is easier in Solaris to reboot the host to allow these changes to take effect:

reboot

Make the iSCSI connection

Now lets add the intended iSCSI volume statically:

iscsiadm add static-config <IQN Number of volume>,<IP of SAN Group>


Verify that this iSCSI target was added:

iscsiadm list target -v

Adjust the iSCSI Properties

To make this work in an Active/Active (or Round Robin) multipath, add the following property to the iSCSI Parameters:

iscsiadm modify target-param -c 2 <IQN>

This allows two (-c 2) simultaneous connections to the IQN target.

Verify that the property has changed

To verify that this iscsi IQN is set correctly, issue this command:

iscsiadm list target-param -v <IQN>
-----Output-----
Target: iqn.2001-05.com.equallogic:0-8a0906-6008c1d02-f18d25eada54b759-ihc
        Alias: IHC
        Bi-directional Authentication: disabled
        Authentication Type: NONE
        Login Parameters (Default/Configured):
                Data Sequence In Order: yes/-
                Data PDU In Order: yes/-
                Default Time To Retain: 20/-
                Default Time To Wait: 2/-
                Error Recovery Level: 0/-
                First Burst Length: 65536/-
                Immediate Data: yes/-
                Initial Ready To Transfer (R2T): yes/-
                Max Burst Length: 262144/-
                Max Outstanding R2T: 1/-
                Max Receive Data Segment Length: 8192/-
                Max Connections: 1/-
                Header Digest: NONE/-
                Data Digest: NONE/-
        '''Configured Sessions: 2'''

Check Log

Also, check the log to determine if Solaris is happy with that configuration:

tail /var/adm/messages
-----Output-----
Feb 23 10:06:03 nfs01 iscsi: [ID 240218 kern.notice] NOTICE: iscsi session(7) iqn.2001-05.com.equallogic:0-8a0906-6008c1d02-f18d25eada54b759-ihc online
Feb 23 10:06:03 nfs01 genunix: [ID 834635 kern.info] /scsi_vhci/disk@g6090a028d0c1086059b754daea258df1 (sd4) multipath status: optimal, 
path /iscsi (iscsi0) to target address: 0001iqn.2001-05.com.equallogic:0-8a0906-6008c1d02-f18d25eada54b759-ihcFFFF,0 is online Load balancing: round-robin

Check SAN Admin Page

Finally, check the SAN admin page for that volume. It should list two connections to that volume from the IP address you had programmed into the initial hostname.nic file. This is located under "Connections" tab on the volume properties. Ensure that it is load-balancing the data evenly also.

--Scotts 18:56, 23 February 2010 (UTC)