Setting up a Sun ZFS Storage Applicance as an iSCSI device

This is a simple post which describes the steps needed to setup a ZFSSA as an iSCSI device.

On the Solaris system

The following steps all need to performed on the Solaris host.

Before we can continue, we heed to confirm that the required packages are installed and that the iSCSI initiator service is enabled.

Required packages

Firstly, determine whether the required software is installed.

s4u-ds# pkginfo | grep iscsi
system SUNWiscsir Sun iSCSI Device Driver (root)
system SUNWiscsitgtr Sun iSCSI Target (Root)
system SUNWiscsitgtu Sun iSCSI Target (Usr)
system SUNWiscsiu Sun iSCSI Management Utilities (usr)

If the required packages are missing, you must install them befoer you continue.

Is the iSCSI initiator enabled?

Verify that the iSCSI initiator service is enabled:

root@s4u-ds# svcs -a | grep iscsi
disabled      Mar_17 svc:/system/iscsitgt:default
online        Mar_17 svc:/network/iscsi/initiator:default

If not enable the service:

root@s4u-ds# svcadm enable iscsi/initiator
root@s4u-ds# svcs -a | grep iscsi
disabled      Mar_17 svc:/system/iscsitgt:default
online        Jun 08 svc:/network/iscsi/initiator:default

Determine the Solaris iqn

Log on to Solaris initiator and find out the IQN value of the server and the number of configured sessions:

root@s4u-ds# iscsiadm list initiator-node
Initiator node name:
Initiator node alias: s4u-ds
        Login Parameters (Default/Configured):
                Header Digest: NONE/-
                Data Digest: NONE/-
                Max Connections: 65535/-
        Authentication Type: NONE
        RADIUS Server: 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

Enable static and/or send targets

The following commands list which discovery method is enabled:

root@s4u-ds# iscsiadm list discovery
        Static: disabled
        Send Targets: enabled
        iSNS: disabled

For the purpose of this article we will enable the sendTarget discovery method:

root@s4u-ds#  iscsiadm modify discovery --sendtargets enable
root@s4u-ds# iscsiadm add discovery-address

On the Sun ZFS Storage Appliance

In the BUI:

  • Go to Configuration -> SAN -> and setup target and initiator portal.
    There is a default target and initiator created which can be used as well.
  • Go to Confiiguration ->Storage pool and create a new storage pool if required
  • Go to Shares ->Project and create a new project.
  • Add LUNS to these project and select the target and initiator portals for the LUNS. You can select the target and initiator options under the Protocol sections when you edit the LUN

Note: You do not need to create target and initiator group. The default ones work one fine.

Finally on the Soalris host:

root@s4u-ds# iscsiadm add discovery-address
root@s4u-ds# iscsiadm modify discovery --sendtargets enable
root@s4u-ds# devfsadm

Now the disk should show up with format.

Note: If you can discovery address and cannot view the target, check /var/adm/messages for any error messages. Try restarting iSCSI service on the target ZFS Applicance and reboot the Solaris server, if needed.