JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Administration: Devices and File Systems     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (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.  Setting Up Disks (Tasks)

11.  Configuring Storage Devices With COMSTAR (Tasks)

Overview of COMSTAR Features

Identifying COMSTAR Software and Hardware Requirements

Configuring Storage Devices With COMSTAR (Task Map)

COMSTAR Terminology

Configuring Dynamic or Static Target Discovery

Configuring Storage Devices With COMSTAR (Tasks)

How to Enable the STMF Service

How to Back Up and Restore a COMSTAR Configuration

How to Create a Logical Unit

How to Create an iSCSI Target

How to Enable iSNS Discovery for the Target Device

How to Configure an IB HCA for iSER

Creating iSCSI Target Portal Groups

Using TPGs with iSER

How to Create a Target Portal Group for iSCSI Targets

How to Access iSCSI Disks

Making SCSI Logical Units Available

How to Make a Logical Unit Available to All Systems

How to Restrict Logical Unit Access to Selected Systems

Configuring Fibre Channel Devices With COMSTAR

Configuring Fibre Channel Ports With COMSTAR

How to Display Existing FC Port Bindings

How to Set All FC Ports to a Specific Mode

How to Set Selected FC Ports to Initiator or Target Mode

Making Logical Units Available for FC and FCoE

How to Make Logical Units Available for FC and FCoE

Configuring FCoE Devices With COMSTAR

Configuring FCoE Ports

Enabling 802.3x PAUSE and Jumbo Frames on the Ethernet Interface

How to Create FCoE Target Ports

How to Verify That an FCoE Target Port Is Working

How to Delete FCoE Target Ports

Configuring SRP Devices With COMSTAR

Using COMSTAR Views With SRP

How to Enable the SRP Target Service

How to Verify SRP Target Status

12.  Configuring and Managing the Oracle Solaris Internet Storage Name Service (iSNS)

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

17.  Copying Files and File Systems (Tasks)

18.  Managing Tape Drives (Tasks)

Index

Configuring Storage Devices With COMSTAR (Tasks)

You can set up and configure a COMSTAR Internet SCSI (iSCSI) target and make it available over the network. The iSCSI features can work over a normal Internet connection (such as Ethernet) using the standard iSCSI protocol. The iSCSI protocol also provides naming and discovery services, authentication services using CHAP and RADIUS, and centralized management through iSNS.

If the system has at least one InfiniBand (IB) Host Channel Adapter (HCA) and connectivity exists between the initiator and the target, the iSCSI connection uses iSCSI Extensions for RDMA (iSER) for enhanced data throughput. iSER used with an IB HCA provides high bandwidth, low CPU utilization, and a single network connection that multiple protocols can share.

The iSER target and initiator both use a component called iSCSI Data Mover to provide iSCSI connection services. Use of iSER is automatic whenever both the initiator and the target are configured to use IP addresses that correspond to IB-capable devices.

How to Enable the STMF Service

COMSTAR uses SMF to store its current, persistent configuration, such as logical unit mapping, host group definitions, and target group definitions. When the service is enabled during boot or when using the svcadm command, it clears any stale configuration data inside the kernel framework, and then reloads the configuration from the SMF repository into the driver. After the configuration is loaded, any changes that are made to the configuration are automatically updated inside the driver database, as well as inside the SMF repository. For example, any changes made through the stmfadm command are automatically updated in both areas.

The COMSTAR target mode framework runs as the stmf service. By default, the service is disabled. You must enable the service to use COMSTAR functionality. You can identify the service with the svcs command. If you have not rebooted the server since installing the group/feature/storage-server package, the service might not be enabled correctly.

  1. Install the COMSTAR storage server software.
    target# pkg install group/feature/storage-server
                  Packages to install:    75
               Create boot environment:    No
                   Services to restart:     7
    DOWNLOAD                                  PKGS       FILES    XFER (MB)
    Completed                                75/75   9555/9555  105.7/105.7
    
    PHASE                                        ACTIONS
    Install Phase                            13347/13347 
    
    PHASE                                          ITEMS
    Package State Update Phase                     75/75 
    Image State Update Phase                         2/2 
    Loading smf(5) service descriptions: 17/17
    Loading smf(5) service descriptions: 3/3
    
    PHASE                                          ITEMS
    Reading Existing Index                           8/8 
    Indexing Packages                              75/75
    Indexing Packages                              75/75
    Optimizing Index...
    
    PHASE                                          ITEMS
    Indexing Packages                            573/573 
  2. Either reboot the system or enable the stmf service.
    target# svcadm enable stmf
    # svcs stmf
    STATE          STIME    FMRI
    online         09:42:32 svc:/system/stmf:default

How to Back Up and Restore a COMSTAR Configuration

After you complete your COMSTAR configuration, make a copy that can be restored, if needed.

  1. Become an administrator.
  2. Export the current COMSTAR configuration.
    # svccfg export -a stmf > COMSTAR.backup
  3. If necessary, restore the exported configuration.
    # svccfg import COMSTAR.backup

How to Create a Logical Unit

The logical unit provider for creating disk-type LUs is called sbd. However, you must initialize the storage for the logical unit before you can share a disk-type LU.

The disk volume provided by the server is referred to as the target. When the LU is associated with an iSCSI target, it can be accessed by an iSCSI initiator.

The process for creating SCSI LUs is as follows:

When a LU is created, it is assigned a global unique identifier (GUID), for example, 600144F0B5418B0000004DDAC7C10001. The GUID is used to refer to the LU in subsequent tasks, such as mapping a LU to select hosts.

The following steps are completed on the system that is providing the storage device.

  1. Create a ZFS storage pool.
    target# zpool create sanpool mirror c2t3d0 c2t4d0
  2. Create a ZFS volume to be used as a SCSI LU.
    target# zfs create -V 2g sanpool/vol1
  3. Create a LU for the ZFS volume.
    target# stmfadm create-lu /dev/zvol/rdsk/sanpool/vol1
    Logical unit created: 600144F0B5418B0000004DDAC7C10001

    You can find the device path for the ZFS volume in the /dev/zvol/rdsk/pool-name/ directory.

  4. Confirm that the LU has been created.
    target# stmfadm list-lu
    LU Name: 600144F0B5418B0000004DDAC7C10001
  5. Add the LU view.

    This command makes the LU accessible to all systems.

    target# stmfadm add-view 600144F0B5418B0000004DDAC7C10001

    If you want to restrict the LU view to specific systems, see How to Restrict Logical Unit Access to Selected Systems.

  6. Verify the LU configuration.
    target# stmfadm list-view -l 600144F0B5418B0000004DDAC7C10001
    View Entry: 0
        Host group   : All
        Target group : All
        LUN          : 0

How to Create an iSCSI Target

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

  1. Enable the iSCSI target service.
    target# svcadm enable -r svc:/network/iscsi/target:default

    Confirm that the service is enabled.

    target# svcs -l iscsi/target
    fmri         svc:/network/iscsi/target:default
    name         iscsi target
    enabled      true
    state        online
    next_state   none
    state_time   Mon May 23 14:48:59 2011
    logfile      /var/svc/log/network-iscsi-target:default.log
    restarter    svc:/system/svc/restarter:default
    dependency   require_any/error svc:/milestone/network (online)
    dependency   require_all/none svc:/system/stmf:default (online)
  2. Create the iSCSI target.
    target# itadm create-target
    Target iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c039405 successfully created
  3. Display the iSCSI target information.
    target# itadm list-target -v
    TARGET NAME                                                  STATE    SESSIONS 
    iqn.1986-03.com.sun:02:73d12edc-9bb9-cb44-efc4-c3b36c039405  online   0        
            alias:                  -
            auth:                   none (defaults)
            targetchapuser:         -
            targetchapsecret:       unset
            tpg-tags:               default

How to Enable iSNS Discovery for the Target Device

Use this method if you have at least one iSNS server on your network. This method enables the iSCSI initiator to discover targets with as little configuration as possible, while also providing state-change notification. State-change functionality notifies the iSCSI initiator when there are changes in the operational state of a target. For this method, you must supply the iSNS server address and port combination. The iSCSI initiator can then query the specified iSNS server to perform device discovery. The default port for an iSNS server is 3205.

  1. Become an administrator.
  2. Add the iSNS server information.
    target# itadm modify-defaults --isns-server ip-address

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

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

  3. Enable iSNS server discovery.
    target# itadm modify-defaults --isns enable

How to Configure an IB HCA for iSER

An InfiniBand (IB) Host Channel Adapter (HCA) is required to take full advantage of the iSCSI Extensions for RDMA (iSER) capabilities. To use iSER, you must configure the HCA on both the target and the initiator.

  1. Become an administrator on the host (initiator) system.
  2. Connect the HCA to an IB switch.

    See the vendor documentation for details.

  3. Check the InfiniBand port status.
    # dladm show-ib
    
    LINK     HCAGUID         PORTGUID       PORT STATE PKEYS
    net4     211700013E84C2  211700013E84C3 1    up    FFFF
    net5     211700013E84C2  211700013E84C4 2    up    FFFF
  4. Create the IB partition link.
    # dladm create-part -l net4 -P ffff ibd0

    After the partition link is created, display the partition info.

    # dladm show-part
    LINK     PKEY OVER          STATE   FLAGS
    ibd0     FFFF net4          unknown ----
  5. Configure the target and the initiator for the HCA.

    The target and the initiator must be on the same subnet. This example uses ibd0 as the driver.

    # ipadm create-ip ibd0
  6. Configure the IP address and port combination for the HCA.
    # ipadm create-addr -T static -a 100.100.10.100/24 ibd0/static
  7. Verify the interface configuration.
    # ipadm show-addr
  8. Become an administrator on the target system and repeat above steps for all other HCA hosts on the network.
  9. Verify connectivity on both the target and the initiator.
    target# ping initiator-ip
    initiator# ping target-ip

Creating iSCSI Target Portal Groups

You can create a target portal group (TPG) to manage the discovery of multiple iSCSI and iSER targets. A TPG is a list of IP addresses to determine upon which interfaces a specific iSCSI target will listen.

A TPG contains IP addresses and TCP port numbers. To use this capability, you need to do the following:

A TPG is an efficient way to control which targets are discovered through specific ports. For example, you could restrict your iSCSI target so that it is available only through one specific IP address or only through a set of iSER-capable IP addresses.


Note - Do not confuse target portal groups with target groups. A target group is a list of SCSI target ports that are all treated the same when creating views. Creating a view can help you facilitate LU mapping. Each view entry specifies a target group, a host group, and a LU. For more information on Target Groups and LUN mapping, see Making SCSI Logical Units Available and stmfadm(1M).


To learn about static and iSNS target discovery, see Configuring Dynamic or Static Target Discovery. The iSCSI initiator uses the iscsiadm command to discover TPGs. For more information, see iscsiadm(1M) and itadm(1M).

Using TPGs with iSER

When you use the SendTargets discovery and iSER at the same time, a common convention is to use a TPG to associate a specific iSCSI target port with only iSER-capable IP addresses. For example, if a target system has four IP addresses, A, B, C, and D, and only addresses B and C are iSER-capable, then addresses B and C could be added to a TPG, and assigned to a target T.

An iSCSI initiator with both Ethernet and InfiniBand (IB) interfaces could use the SendTargets discovery method to discover the possible storage targets. Without the use of TPGs, the initiator might always prefer the use of the Ethernet interfaces over the IB interfaces. By associating target T only with the IB interfaces, the initiator correctly prefers using its IB-capable interface when connecting to target T.

How to Create a Target Portal Group for iSCSI Targets

You can create a target portal group (TPG) by providing a unique name, and a TPG Tag (ranging from 2–65535) is automatically generated. TPG Tag 1 is reserved for the default TPG that is used when you do not explicitly set a TPG on the target. The portal for the default TPG matches requests from all network interfaces on port 3260.

The following steps shows how to create two TPGs, TPGA and TPGB, that use port 8000 for the IP addresses in TPGB.

  1. Become an administrator.
  2. Create two TPGs.
    target# itadm create-tpg TPGA 192.168.0.1 192.168.0.2
    target# itadm create-tpg TPGB 192.168.0.2:8000 192.168.0.2:8000

    Note - IPv4 portals are specified in dotted address notation (for example, 192.168.0.1). IPv6 portal addresses must be enclosed in square brackets.


  3. Configure an existing iSCSI target to use the TPGs, TPGA and TPGB.
    # itadm modify-target -t TPGA,TPGB eui.20387ab8943ef7548
  4. Verify the TPGs that you created.
    # itadm list-tpg -v

    You can remove a TPG with the itadm delete-tpg command.

How to Access iSCSI Disks

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

You can create a ZFS storage pool on the LU and then create a ZFS file system.

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

  1. Review the iSCSI LU information in the format output.
    initiator# format
           0. c0t600144F0B5418B0000004DDAC7C10001d0 <SUN-COMSTAR-1.0 cyl 1022 alt 2 hd 128 sec 32>
              /scsi_vhci/disk@g600144f0b5418b0000004ddac7c10001
           1. c8t0d0 <Sun-STK RAID INT-V1.0 cyl 17830 alt 2 hd 255 sec 63>
              /pci@0,0/pci10de,375@f/pci108e,286@0/disk@0,0
           2. c8t1d0 <Sun-STK RAID INT-V1.0-136.61GB>
              /pci@0,0/pci10de,375@f/pci108e,286@0/disk@1,0
           3. c8t2d0 <Sun-STK RAID INT-V1.0-136.61GB>
              /pci@0,0/pci10de,375@f/pci108e,286@0/disk@2,0
           4. c8t3d0 <Sun-STK RAID INT-V1.0 cyl 17830 alt 2 hd 255 sec 63>
              /pci@0,0/pci10de,375@f/pci108e,286@0/disk@3,0
    Specify disk (enter its number): 0
    selecting c0t600144F0B5418B0000004DDAC7C10001d0
    [disk formatted]

    In the above output, disk 0 is an iSCSI LU under MPxIO control. Disks 1-4 are local disks.

  2. You can create a ZFS storage pool and ZFS file systems on the iSCSI LU.
    initiator# zpool create pool-name c0t600144F0B5418B0000004DDAC7C10001d0
    initiator# zfs create pool-name/fs-name

    The ZFS file system is automatically mounted when created and is remounted at boot time.

Making SCSI Logical Units Available

Simply registering a logical unit (LU) with the STMF framework does not make it available to hosts (initiators) on the network. This section describes how to make LUs visible to initiator hosts for the following configurations.

For iSCSI, Fibre Channel, and FCoE configurations, a LU must be mapped before it can be accessed. You can choose one of the following methods, both of which use the stmfadm command:


Note - Don't confuse a target group with a target portal group (TPG). A TPG is a list of IP addresses that an iSCSI target listens to. A TPG can help you restrict an iSCSI target so that it is available only through one specific IP address. For more information on target groups, see stmfadm(1M).


A view entry consists of four components: host group, target group, logical unit number (LUN), and LU identifier. Of these four components, only the LU identifier is required. If the other components are omitted, the following default values are assumed:

How to Make a Logical Unit Available to All Systems

This procedure makes a LU available to all initiator hosts on a storage network.

  1. Obtain the Global Unique Identification (GUID) number for the LU.
    # stmfadm list-lu -v
  2. Add a view for the logical unit.
    3 # stmfadm add-view GUID-number

How to Restrict Logical Unit Access to Selected Systems

Use this procedure to restrict LU access to selected hosts on a storage network. If you are using Fibre Channel ports, first identify the World Wide Names (WWN). Then, selectively map a logical unit number (LUN) to the ports on host-a, for example. A target group (targets-0) is also defined for a given set of target ports that export the same set of LUs to the same host group.

For information about configuring a target group, see stmfadm(1M).

  1. Become an administrator.
  2. Identify the Fibre Channel (FC) port on the initiator.
    initiator# fcinfo hba-port
    HBA Port WWN: 210000e08b195dae
            Port Mode: Initiator
            Port ID: 0
            OS Device Name: /dev/cfg/c8
            Manufacturer: QLogic Corp.
            Model: 375-3108-xx
            Firmware Version: 03.03.28
            FCode/BIOS Version:  fcode: 1.13;
            Serial Number: not available
            Driver Name: qlc
            Driver Version: 20100408-3.01
            Type: unknown
            State: offline
            Supported Speeds: 1Gb 2Gb 
            Current Speed: not established 
            Node WWN: 200000e08b195dae
            NPIV Not Supported
    .
    .
    .
  3. Create a host group.
    target# stmfadm create-hg host-a 210000e08b195dae 210100e08b395dae
  4. Add the WWNs identified in the preceding output as members of the host group.
    target# stmfadm add-hg-member -g host-a
  5. Create a target group.
    target# stmfadm create-tg targets-0
  6. Specify the target group members by adding the target names.

    Each SCSI target can be a member of only one target group.

    target# stmfadm add-tg-member -g targets-0 wwn.guid-number
  7. Identify the GUID number for the LU.
    target# stmfadm list-lu -v
  8. Make the LU available by adding a view entry, specifying the host group name and the LU GUID number.
    target# stmfadm add-view -h host-a -t targets-0 -n 1 guid-number