JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview/Tasks)

2.  Writing CDs and DVDs (Tasks)

3.  Managing Devices (Tasks)

4.  Dynamically Configuring Devices (Tasks)

5.  Managing USB Devices (Tasks)

6.  Using InfiniBand Devices (Overview/Tasks)

7.  Managing Disks (Overview)

8.  Managing Disk Use (Tasks)

9.  Administering Disks (Tasks)

10.  SPARC: Setting Up Disks (Tasks)

11.  x86: Setting Up Disks (Tasks)

12.  Configuring Oracle Solaris iSCSI Targets (Tasks)

Oracle Solaris iSCSI Technology (Overview)

Identifying Solaris iSCSI Software and Hardware Requirements

Configuring Solaris iSCSI Target Devices (Tasks)

Oracle Solaris iSCSI Terminology

Configuring Dynamic or Static Target Discovery

Configuring and Managing Solaris iSCSI Target Devices

How to Create an iSCSI Target

How to Configure iSCSI Target Discovery

How to Configure iSNS Discovery for the Solaris iSCSI Target

How to Access iSCSI Disks

How to Access iSCSI Disks Upon Reboot

How to Remove Discovered iSCSI Targets

Configuring Authentication in Your iSCSI-Based Storage Network

How to Configure CHAP Authentication for Your iSCSI Initiator

How to Configure CHAP Authentication for Your iSCSI Target

Using a Third-Party RADIUS Server to Simplify CHAP Management in Your iSCSI Configuration

How to Configure RADIUS for Your iSCSI Configuration

Solaris iSCSI and RADIUS Server Error Messages

Setting Up Solaris iSCSI Multipathed Devices

How to Enable Multiple iSCSI Sessions for a Target

Monitoring Your iSCSI Configuration

Monitoring Your iSCSI Configuration

Modifying iSCSI Initiator and Target Parameters

How to Modify iSCSI Initiator and Target Parameters

Troubleshooting iSCSI Configuration Problems

No Connections to the iSCSI Target From the Local System

How to Troubleshoot iSCSI Connection Problems

iSCSI Device or Disk Is Not Available on the Local System

How to Troubleshoot iSCSI Device or Disk Unavailability

Use LUN Masking When Using the iSNS Discovery Method

General iSCSI Error Messages

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

17.  Checking UFS File System Consistency (Tasks)

18.  UFS File System (Reference)

19.  Backing Up and Restoring UFS File Systems (Overview/Tasks)

20.  Using UFS Snapshots (Tasks)

21.  Copying Files and File Systems (Tasks)

22.  Managing Tape Drives (Tasks)

23.  UFS Backup and Restore Commands (Reference)

Index

Configuring Solaris iSCSI Target Devices (Tasks)

This is a general list of tasks associated with configuring Solaris iSCSI target devices. Some of the tasks are optional depending on your network configuration needs. Some of the links below will take you to separate documents that describe network configuration and initiator configuration.

Oracle Solaris iSCSI Terminology

Review the following terminology before configuring iSCSI targets and initiators.

Term
Description
Initiator
The driver that initiates SCSI requests to the iSCSI target.
Target device
The iSCSI storage component.
Discovery
The process that presents the initiator with a list of available targets.
Discovery method
The way in which the iSCSI targets can be found. Three methods are currently available:
  • Internet Storage Name Service (iSNS) – Potential targets are discovered by interacting with one or more iSNS servers.

  • SendTargets – Potential targets are discovered by using a discovery-address.

  • Static – Static target addressing is configured.

Configuring Dynamic or Static Target Discovery

Determine whether you want to configure one of the dynamic device discovery methods or use static iSCSI initiator targets to perform device discovery.


Note - Do not configure an iSCSI target to be discovered by both static and dynamic device discovery methods. The consequence of using redundant discovery methods might be slow performance when the initiator is communicating with the iSCSI target device.


Configuring and Managing 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 Using a ZFS Volume as a Solaris iSCSI Target in Oracle 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:

How 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. Create a ZFS pool and volume.
    target# zpool create sanpool mirror c1t2d0 c1t3d0
    target# zfs create sanpool/vol1
  3. Identify the target's backing store directory.

    For example:

    target# iscsitadm modify admin -d /sanpool/vol1
  4. Create an iSCSI target.

    For example:

    target# iscsitadm create target --size 2g sanpool
  5. Display information about the iSCSI target.

    For example:

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

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

How to Configure iSCSI Target Discovery

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

  1. Become superuser.
  2. Configure the target device to be discovered dynamically or statically using one of the following methods:
    • Configure the device to be dynamically discovered (SendTargets).

      For example:

      initiator# iscsiadm add discovery-address 10.0.0.1:3260
    • Configure the device to be dynamically discovered (iSNS).

      For example:

      initiator# iscsiadm add iSNS-server 10.0.0.1:3205
    • Configure the device to be statically discovered.

      For example:

      initiator# iscsiadm add static-config eui.5000ABCD78945E2B,10.0.0.1

    The iSCSI connection is not initiated until the discovery method is enabled. See the next step.

  3. Enable the iSCSI target discovery method using one of the following:
    • If you have configured a dynamically discovered (SendTargets) device, enable the SendTargets discovery method.

      initiator# iscsiadm modify discovery --sendtargets enable
    • If you have configured a dynamically discovered (iSNS) device, enable the iSNS discovery method.

      initiator# iscsiadm modify discovery --iSNS enable
    • If you have configured static targets, enable the static target discovery method.

      initiator# iscsiadm modify discovery --static enable
  4. Create the iSCSI device links for the local system.
    initiator# devfsadm -i iscsi

How 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.

How to Access iSCSI Disks

If you want to access the iSCSI disks upon reboot, create the file system on the disk, and add an /etc/vfstab entry as you would with a UFS file system on a SCSI device. Then, create a new SMF service for mounting iSCSI disks that depends on the iSCSI initiator service. For more information, see How to Access iSCSI Disks Upon Reboot.

After the devices have been discovered by the Solaris iSCSI initiator, the login negotiation occurs automatically. The Solaris iSCSI driver determines the number of available LUNs and creates the device nodes. Then, the iSCSI devices can be treated as any other SCSI device.

You can view the iSCSI disks on the local system by using the format utility.

In the following format output, disks 2 and 3 are iSCSI LUNs that are not under MPxIO control. Disks 21 and 22 are iSCSI LUNs under MPxIO control.

initiator# format
AVAILABLE DISK SELECTIONS:
       0. c0t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e010685cf1,0
       1. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w500000e0106e3ba1,0
       2. c3t0d0 <ABCSTORAGE-100E-00-2.2 cyl 20813 alt 2 hd 16 sec 63>
          /iscsi/disk@0000iqn.2001-05.com.abcstorage%3A6-8a0900-477d70401-
           b0fff044352423a2-hostname-020000,0
       3. c3t1d0 <ABCSTORAGE-100E-00-2.2 cyl 20813 alt 2 hd 16 sec 63>
           /iscsi/disk@0000iqn.2001-05.com.abcstorage%3A6-8a0900-3fcd70401 
           -085ff04434f423a2-hostname-010000,0
.
.
.
      21. c4t60A98000686F694B2F59775733426B77d0 <ABCSTORAGE-LUN-0.2 cyl  
          4606 alt 2 hd 16 sec 256>
          /scsi_vhci/ssd@g60a98000686f694b2f59775733426b77
      22. c4t60A98000686F694B2F59775733434C41d0 <ABCSTORAGE-LUN-0.2 cyl  
          4606 alt 2 hd 16 sec 256>
          /scsi_vhci/ssd@g60a98000686f694b2f59775733434c41

How to Access iSCSI Disks Upon Reboot

Follow the steps below to access iSCSI disks after the system is rebooted.

  1. Become superuser or assume an equivalent role.
  2. Add entries for the iSCSI LUN(s) to the /etc/vfstab file. Set the mount at boot option to iscsi.
    initiator# vi /etc/vfstab
    #device         device          mount           FS      fsck    mount   mount
    #to mount       to fsck         point           type    pass    at boot options
    #
    /dev/dsk/c3t600144F04B555F370000093D00495B00d0s0        -       /mnt    ufs     -       no      -

How to Remove Discovered iSCSI Targets

After removing a discovery address, iSNS server, or static configuration, or after disabling a discovery method, the associated targets are logged out. If these associated targets are still in use, for example, they have mounted file systems, the logout of these devices will fail, and they will remain on the active target list.

This optional procedure assumes that you are logged in to the local system where access to an iSCSI target device has already been configured.

  1. Become superuser.
  2. (Optional) Disable an iSCSI target discovery method using one of the following:
    • If you need to disable the SendTargets discovery method, use the following command:

      initiator# iscsiadm modify discovery --sendtargets disable
    • If you need to disable the iSNS discovery method, use the following command:

      initiator# iscsiadm modify discovery --iSNS disable
    • If you need to disable the static target discovery method, use the following command:

      initiator# iscsiadm modify discovery --static disable
  3. Remove an iSCSI device discovery entry using one of the following:
    • Remove an iSCSI SendTargets discovery entry.

      For example:

      initiator# iscsiadm remove discovery-address 10.0.0.1:3260
    • Remove an iSCSI iSNS discovery entry.

      For example:

      # iscsiadm remove isns-server 10.0.0.1:3205
    • Remove a static iSCSI discovery entry.

      For example:

      initiator# iscsiadm remove static-config eui.5000ABCD78945E2B,10.0.0.1

    Note - If you attempt to disable or remove a discovery entry that has an associated logical unit in use, the disable or remove operation fails with the following message:

    logical unit in use

    If this errors occurs, stop all associated I/O on the logical unit, unmount the file systems, and so on. Then, repeat the disable or remove operation.


  4. Remove the iSCSI target device.

    Remove a target by specifying the logical unit number (LUN). If you did not specify a LUN when the target was created, a value of 0 was used. LUN 0 must be the last LUN removed if multiple LUNs are associated with a target.

    For example:

    initiator# iscsitadm delete target --lun 0 sandbox