System Administration Guide: Devices and File Systems

Setting Up Your Solaris iSCSI Target Devices

You can use the iscsitadm command to set up and manage your Solaris iSCSI target devices, which can be disk or tape devices. For the device that you select as your iSCSI target, you must provide an equivalently sized ZFS or UFS file system as the backing store for the iSCSI daemon.

For information about setting up a Solaris iSCSI target device with ZFS, see ZFS and Solaris iSCSI Improvements in Solaris ZFS Administration Guide.

After the target device is set up, use the iscsiadm command to identify your iSCSI targets, which will discover and use the iSCSI target device.

For more information, see iscsitadm(1M) and iscsiadm(1M).

The basic process is as follows:

ProcedureHow to Create an iSCSI Target

This procedure assumes that you are logged in to the local system that contains the iSCSI targets.

  1. Become superuser.

  2. Identify the backing store directory.

    For example:


    target# iscsitadm modify admin -d /export/sandbox
    
  3. Create an iSCSI target.

    For example:


    target# iscsitadm create target --size 2g sandbox
    
  4. Display information about the iSCSI target.

    For example:


    target# iscsitadm list target -v sandbox
    
  5. Set up your iSCSI initiator to discover and use this target.

    For more information, see How to Configure iSCSI Target Discovery.

ProcedureHow to Configure iSNS Discovery for the Solaris iSCSI Target

If your network includes a third-party iSNS server or a Sun iSNS server, you can set up iSNS target discovery on your Solaris iSCSI targets.

This procedure assumes that you are logged in to the local system where you want to access a configured iSCSI target device.

  1. Become superuser.

  2. Add the iSNS server information.

    For example:


    initiator# iscsitadm modify admin --isns-server ip-address or hostname[:port]

    Identify the ip-address of the iSNS server in your network.

    This step adds the iSNS server information to all of the Solaris iSCSI targets.

  3. Enable iSNS server discovery.

    For example:


    initiator# iscsitadm modify admin --isns-access enable
    

    This step enables iSNS discovery for all of the Solaris iSCSI targets.