Skip to main content

Configure iSCSI with Solaris 10 to a Dell PowerVault

The other day I had to allocate some SAN Space from a [Dell PowerVault MD3000i][md3000i] to a Solaris 10 server, and was amazed that not only do DELL consider Solaris an unsupported platform for connecting to their devices, but the general level of documentation around iSCSI and Dell is pretty low.

So I've decided to document what I did to set it up.

This guide will presume that you have already configured the Virtual Disk, and allocated it to this machine via the DELL SAN Configuration Tool. Additionally, the below steps were for a Solaris Sun Fire V120 running Solaris 10 (120011-14), so your mileage may vary.

### Configure your Network Interface To use your SAN correctly, you should place your SAN connection on a separate network to your normal network traffic. This not only helps keep things secure and separate, but cuts out network congestion you want to avoid so that your SAN response times are fast.

If you aren't using a separate network connection, then jump to the next step.

#### Step 1 - Pre-config Start by determining the interface you are going to configure for the SAN. In this example, mine will be eri1 (the primary interface is eri0). Also determine the IP you will be allocating to this machine for that interface and a hostname for this interface. We will use and server123i.

Next, you will need to configure a couple of files with the settings for this interface.

#### Step 2 - Create /etc/hostname.interface Create a new file called /etc/hostname.eri1 and the only thing to be in this file, is the hostname you determined above (server123i).

# cat /etc/hostname.eri1 server123i

#### Step 3 - Add entry to /etc/hosts Add a new entry to /etc/hosts mapping your new hostname, to it's IP.

# grep server123i /etc/hosts server123i

#### Step 4 - Add entry to /etc/netmasks Add a new entry to /etc/netmasks to store the correct netmask for this IP address range.

# grep -v '^#' /etc/netmasks

#### Step 5 - Restart networking service Restart the networking service to have Solaris reload the settings for the interface.

# svcadm restart network/physical

#### Step 6 - Check your interface is now available If all went well, you will now have your interface, eri1 configured with the IP you specified, and in the UP state.

# ifconfig eri1 eri1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

System Message: ERROR/3 (<string>, line 48)

Unexpected indentation.
inet netmask ffffff00 broadcast ether 0:f:4d:a4:c4:9e

### Configure iSCSI on Solaris

This bit isn't too difficult, but there are some extra steps as we have to work around the DELL PowerVault not working 100% as it should, with Solaris.

#### Step 1 - Enable Solaris iSCSI Initiator First we need to check if the iSCSI Initiator service is running. If it isn't, then we need to enable it.

# svcs -a |grep iscsi disabled Jun_22 svc:/network/iscsi_initiator:default disabled Jun_22 svc:/system/iscsitgt:default

System Message: WARNING/2 (<string>, line 58); backlink

Inline substitution_reference start-string without end-string.

# svcadm enable svc:/network/iscsi_initiator

# svcs -a |grep iscsi online 15:10:00 svc:/system/iscsitgt:default online 15:15:10 svc:/network/iscsi_initiator:default

System Message: WARNING/2 (<string>, line 64); backlink

Inline substitution_reference start-string without end-string.

#### Step 2 - Add Discovery Address Next, we need to tell iSCSI Initiator where our SAN is (Discovery Address). In our example, we will use on port 3260.

# iscsiadm add discovery-address

#### Step 3 - Enable iSCSI Discovery At this point, if we were to do this with Auto Discovery (SendTargets Discovery) with iSCSI, we would just have to do iscsiadm modify discovery -t enable and our disk and SAN would automatically be found, and the Virtual Disk created as a Device (/dev/rdsk).

However, as this doesn't work, we have to use Statically Assigned Targets. To do this, we first need to get a list of all targets we can see.

# iscsiadm list target -v

System Message: WARNING/2 (<string>, line 81)

Definition list ends without a blank line; unexpected unindent.
IP address (Local): IP address (Peer):

Now that you have the target, you can add this address into the iSCSI Static Config. Note: at the end of the target name in the below, you need to add a comma, followed by the IP Address.

iscsiadm add static-config,

#### Step 4 - Configure DELL PowerVault SAN After we have done this, if you haven't previously, now is a good time to go and configure the Virtual Disk and Server on the DELL SAN Configuration Tool, otherwise the next steps will fail.

Once this is done, move onto the next step.

#### Step 5 - Enable Static Discovery

Now that you have Solaris configured and the SAN configured, you now need to turn on Static Discovery. To do this:

iscsiadm modify discovery -s enable

Once this is done, you should take a look at dmesg and you will notice that you have some messages towards the end about your disks coming online.

iscsi: [ID 240218 kern.notice] NOTICE: iscsi session(40) <target> online scsi: [ID 799468] sd2 at iscsi0: name <target>,0, bus address <target>,0 genunix: [ID 936769] sd2 is /iscsi/disk@0000<target>,0 scsi: [ID 107833 kern.warning] WARNING: /iscsi/disk@0000<target>,0 (sd2):

System Message: ERROR/3 (<string>, line 108)

Unexpected indentation.
Corrupt label; wrong magic number

System Message: WARNING/2 (<string>, line 109)

Block quote ends without a blank line; unexpected unindent.

genunix: [ID 408114] /iscsi/disk@0000<target>,0 (sd2) online scsi: [ID 799468] sd3 at iscsi0: name 0000<target>F,31, bus address 0000<target>,31 genunix: [ID 936769] sd3 is /iscsi/disk@0000<target>,31 scsi: [ID 107833 kern.warning] WARNING: /iscsi/disk@0000<target>,31 (sd3):

System Message: ERROR/3 (<string>, line 113)

Unexpected indentation.
Corrupt label; wrong magic number

System Message: WARNING/2 (<string>, line 114)

Block quote ends without a blank line; unexpected unindent.

genunix: [ID 408114] /iscsi/disk@0000<target>,31 (sd3) online

The above shows two things. It shows that your disk has come online (,0) and that the DELL Universal Xport has come online (,31). The error messages about 'Corrupt label; wrong magic number' are safe to ignore, as our disk hasn't been formatted.

To see more details about the disks that have been mounted, you can get this by using the command iscsiadm list target -S. This will tell you the /dev/rdsk nodes associated with your disk(s), among a few other details.

#### Step 6 - Finishing Up - Partition and Format

Now that you have your disk showing up, you can simply use format and newfs (or however you wish), and use this disk for your need. This disk with work the same as a physical disk attached to the system.

Credits for some of the points in here to the following articles, I have simply tried to join it all into one article.

  1. [iSCSI Troubleshooting][link1]
  2. [comp.unix.solaris thread at Google Groups][link2]
  3. [Connecting to an iSCSI Target with Open-iSCSI Initiator using Solaris][link3]

[md3000i]: [link1]: [link2]: [link3]: