ISCSIAdm
OK ... quick steps, but first some preconditions that must be met:
- You need Solaris 10 Update 3 or greater (Update 2 "may" work, but I only tested this on U3)
- Disconnect the host NIC ports used for the iSCSI Connections to the array.
- You should have the switch configured for trunking the interfaces on the Sun system that will be used for iSCSI.
- The IP Address used for the aggregate link must have the correct, only route for all of the group's IP Addresses.
One easy way to do this is to use an IP Address on the same subnet as the group IP Addresses,
and have any other NIC's in the server on a separate subnet.
Now, the steps are as follows:
- Be sure that all interfaces to be used in the aggregated link are not plumbed.
If you see them in ifconfig -a, they are plumbed. Do the following:
# ifconfig <interface name> unplumb
NOTE: Make sure they are configured at boot.
Look for any /etc/hostname.<interface instance> files and either move or delete them.
- Create an aggregate link using the dladm command:
# dladm create-aggr -P L2 -l passive -d <interface 1 instance> -d <interface 2 instance> <link aggr number>
The options are as follows:
-P: The policy. L2 uses the source and destination mac address to determine which interface to send the data through and this
is the only option that worked for me.
-l: The LACP mode. Off, active, or passive. This is dependent on how the switch is configured
(if switch is active, you want this as passive.
If not using LACP for trunking, turn this off which is the default)
-d: The interface to assign to this aggregate configuration. Up to 4 can be specified.
<interface # instance>: The interface instance device name.
Examples: bge0, e1000g1, ce0, ... <link aggr number>:
The instance number for the aggregate link.Between 1 and 999.
- Physically connect the host NIC ports used for the iSCSI connection to the array.
- Plumb the aggregate interface:
# ifconfig aggr1 plumb
- Configure the aggr interface as you would a normal interface:
# ifconfig aggr1 172.23.51.68 netmask 255.255.0.0
- Up the interface:
# ifconfig aggr1 up
- Ping the group and all other group IP Addresses (all interfaces) to verify connectivity.
NOTE: Once ping is verified, you should be sure to configure the aggr1 interface at boot with an IP Address:
- Create a file in the /etc directory named hostname.aggr<instace/key number> with a "hostname" as the only contents.
- Add a line to the /etc/hosts file which contains the IP Address at the beginning with the "hostname" specified in
the previous step separated from the IP by some whitespace.
- Configure the iSCSI Initiator to connect twice to any configured targets:
# iscsiadm modify initiator-node -c 2
- Configure the discovery address:
# iscsiadm add discovery-address 172.23.10.70
- Enable the static discovery mode:
# iscsiadm modify discovery -s enable
- List the available targets:
# iscsiadm list discovery-address -v
- Configure the targets:
# iscsiadm add static-config <targetname from previous step>,<group IP Addres from previous step>
- If the device isn't configured automagically, tell Solaris to reconfigure its devices:
# devfsadm -Cv
You can get the device name by running the following command:
- Use iscsiadm list target -vS
When wanting to verify the performance of the aggregate link there are a couple ways to do this:
- Use iostat -dxz 5
- Use dladm show-aggr -s -i 5 <aggr instance/key>