iSCSI Initiator: OpenIndiana

iSCSI Initiator: OpenIndiana

Alot of my time is spent handling storage from the array side, however recently I had the need to test both sides of the process in order to perform some exclusionary tests against a fully adaptable environment, without impacting our production environments, so I ended up using OpenIndiana 151a on both the target and initator side of the connection.  This is how you handle the initiator side of the connection.

Identify the Initiator IQN

First we need to identify the IQN of the iSCSI initiator, this is necessary to configure the security on the iSCSI target.

# iscsiadm list initiator-node
Initiator node name:
Initiator node alias: openindiana
Login Parameters (Default/Configured):
Header Digest: NONE/-
Data Digest: NONE/-
Authentication Type: NONE
RADIUS Access: disabled
Tunable Parameters (Default/Configured):
Session Login Response Time: 60/-
Maximum Connection Retry Time: 180/-
Login Retry Time Interval: 60/-
Configured Sessions: 1

Configure iSCSI Static Discovery

Here we configure the type of discovery that we want to use, in our case we are using static discovery.

# iscsiadm modify discovery --static enable

Here we add the actual discovery parameters, the IQN of the target, as well as the IP which we will connect to to create the connection.

# iscsiadm add static-config,

View Available LUNs

Now with everything working on both sides of the connection we will end up seeing specifics about our connection, and our available LUNs

# iscsiadm list target -vS
Alias: -
ISID: 4000002a0000
Connections: 1
CID: 0
IP address (Local):
IP address (Peer):
Discovery Method: Static
Login Parameters (Negotiated):
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: 32768
Max Connections: 1
Header Digest: NONE
Data Digest: NONE

LUN: 0
Vendor:  OI
Product: COMSTAR
OS Device Name: /dev/rdsk/c4t600144F0B7EA490000004F471B750001d0s2

Notice LUN 0 in the above output.  This is our LUN, remember if you expose multiple LUNs then you will see multiple LUNs here, this is not yet a usable disk for that we will need to use the format utility to identify the disk name.

# format
Searching for disks...done

0. c3t0d0 <ATA-WDCWD5003ABYX-1-1S02 cyl 60798 alt 2 hd 255 sec 63>
1. c4t600144F0B7EA490000004F471B750001d0 <OI-COMSTAR-1.0 cyl 1303 alt 2 hd 255 sec 63>

We now have a completed iSCSI session, and we have a usable volume on our client side.