Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Devices and File Systems Oracle Solaris 11 Express 11/10 |
1. Managing Removable Media (Overview)
2. Managing Removable Media (Tasks)
3. Accessing Removable Media (Tasks)
4. Writing CDs and DVDs (Tasks)
5. Managing Devices (Overview/Tasks)
6. Dynamically Configuring Devices (Tasks)
7. Using USB Devices (Overview)
9. Using InfiniBand Devices (Overview/Tasks)
11. Administering Disks (Tasks)
12. SPARC: Adding a Disk (Tasks)
13. x86: Adding a Disk (Tasks)
14. Configuring iSCSI Storage Devices With COMSTAR
COMSTAR and iSCSI Technology (Overview)
COMSTAR Software and Hardware Requirements
Configuring COMSTAR (Task Map)
Configuring Dynamic or Static Target Discovery
How to Create the iSCSI Target
How to Configure an iSCSI Initiator
How to Access iSCSI Disks Upon Reboot
How to Restrict LUN Access to Selected Systems
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
Solaris iSCSI and RADIUS Server Error Messages
Booting and Installing Solaris From an iSCSI LUN
Hardware and Software Requirements for iSCSI Booting
How to Install the Oracle Solaris Release on an iSCSI LUN
How to Boot Solaris from an iSCSI LUN (x86)
How to Boot Solaris from an iSCSI LUN (SPARC)
How to Remove Discovered iSCSI Targets
Monitoring Your iSCSI Configuration
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
15. Configuring and Managing the Solaris Internet Storage Name Service (iSNS)
17. The format Utility (Reference)
18. Managing File Systems (Overview)
19. Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)
20. Mounting and Unmounting File Systems (Tasks)
21. Configuring Additional Swap Space (Tasks)
22. Copying Files and File Systems (Tasks)
|
Configuring your Solaris iSCSI targets and initiators with COMSTAR involves the following steps:
Identifying hardware and software requirements
Configuring your IP network
Connecting and setting up the iSCSI target device
Configuring the initiators
Configuring the iSCSI target discovery method
Creating file systems on your iSCSI disks
(Optional) Configuring iSCSI authentication between the iSCSI initiator and the iSCSI target, if necessary
Monitoring your iSCSI configuration
The iSCSI configuration information is stored in the /etc/iscsi directory, but it requires no manual administration.
Review the following terminology before configuring iSCSI targets and initiators.
|
Determine whether you want to configure one of the dynamic device discovery methods or use static iSCSI initiator targets to perform device discovery.
Dynamic device discovery – If an iSCSI node exposes many targets, such as an iSCSI to Fibre-Channel bridge, you can supply the iSCSI node IP address/port combination and allow the iSCSI initiator to use the SendTargets features to perform device discovery.
Two dynamic device discovery methods are available:
SendTargets - If an iSCSI node exposes a large number of targets, such as an iSCSI to Fibre-Channel bridge, you can supply the iSCSI node IP address/port combination and allow the iSCSI initiator to use the SendTargets features to perform the device discovery.
iSNS - iSNS (Internet Storage Name Service) allows the iSCSI initiator to discover the targets to which it has access using as little configuration information as possible. It also provides state change notification to notify the iSCSI initiator when changes in the operational state of storage nodes occur. To use the iSNS discovery method, you can supply the iSNS server address/port combination and allow the iSCSI initiator to query the iSNS servers that you specified to perform the device discovery. The default port for the iSNS server is 3205. For more information about iSNS, see RFC 4171:
http://www.ietf.org/rfc/rfc4171.txt
The iSNS discovery service provides an administrative model to discover all targets in a network.
For more information about setting up Solaris iSNS support, see Chapter 15, Configuring and Managing the Solaris Internet Storage Name Service (iSNS).
Static device discovery – If an iSCSI node has few targets or if you want to restrict the targets that the initiator attempts to access, you can statically configure the target-name by using the following static target address naming convention:
target,target-address[:port-number]
You can determine the static target address from the array's management tool.
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.
The disk volume provided by the server is referred to as the target. When the LUN is associated with an iSCSI target, it can be accessed by an iSCSI initiator.
The following tasks are completed on the system that is providing the storage device.
target# pkg install storage-server Packages to install: 19 Create boot environment: No Services to restart: 1 DOWNLOAD PKGS FILES XFER (MB) Completed 19/19 674/674 47.9/47.9 PHASE ACTIONS Install Phase 1386/1386 PHASE ITEMS Package State Update Phase 19/19 Image State Update Phase 2/2 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 19/19 Indexing Packages 19/19 Optimizing Index...
target# svcadm enable stmf # svcs stmf STATE STIME FMRI online 09:42:32 svc:/system/stmf:default
target# zpool create sanpool mirror c2t3d0 c2t4d0
target# zfs create -V 2g sanpool/vol1
target# stmfadm create-lu /dev/zvol/rdsk/sanpool/vol1 Logical unit created: 600144F0C49A050000004CC84BE20001
You can find the device path for the ZFS volume in /dev/zvol/rdsk/pool-name/.
target# stmfadm list-lu LU Name: 600144F0C49A050000004CC84BE20001
This command makes the LUN accessible to all systems.
target# stmfadm add-view 600144F0C49A050000004CC84BE20001
If you want to restrict the LUN view to specific systems, see How to Restrict LUN Access to Selected Systems.
target# stmfadm list-view -l 600144F0C49A050000004CC84BE20001 View Entry: 0 Host group : All Target group : All LUN : 0
This procedure assumes that you are logged in to the local system that contains the iSCSI targets.
target# svcadm enable -r svc:/network/iscsi/target:default
Confirm that the service is started.
target# svcs -l iscsi/target fmri svc:/network/iscsi/target:default name iscsi target enabled true state online next_state none state_time Wed Oct 27 09:59:59 2010 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)
target# itadm create-target Target iqn.1986-03.com.sun:02:a4a694bc-6de2-ee50-8979-e25ba29acb86 successfully created
target# itadm list-target -v TARGET NAME STATE SESSIONS iqn.1986-03.com.sun:02:a4a694bc-6de2-ee50-8979-e25ba29acb86 online 0 alias: - auth: none (defaults) targetchapuser: - targetchapsecret: unset tpg-tags: default
Part of initiator configuration process is to identify the iSCSI target discovery process, which presents an initiator with a list of available targets. You can configure iSCSI Targets for static, Send Targets, or iSNS dynamic discovery. Dynamic discovery using the Send Targets option is the optimum configuration for an iSCSI initiator that accesses a large number of targets, such over an iSCSI to Fibre Channel bridge. Send Targets dynamic discovery requires the IP address and port combination of the iSCSI target for the iSCSI initiator to be able to perform the device discovery. The most common discovery method is Send Targets.
When configuring target discovery, you will need to provide the following information:
Static — Target IP address and target name
Send Targets — Target IP address
iSNS — iSNS server address
For more information about configuring target discovery methods, see Configuring Dynamic or Static Target Discovery.
initiator# svcadm enable network/iscsi/initiator
target# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 6 inet 10.10.46.83 netmask ffffff00 broadcast 10.10.46.255 ether 0:1e:68:2f:4f:62 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 e1000g0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 6 inet6 fe80::21e:68ff:fe2f:4f62/10 ether 0:1e:68:2f:4f:62 target# itadm list-target TARGET NAME STATE SESSIONS iqn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b online 0
initiator# iscsiadm add static-config qn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b, 10.10.46.83
initiator# iscsiadm list static-config Static Configuration Target: iqn.1986-03.com.sun:02:71561778-137f-ca37-dd31-9f833173ce6b, 10.10.46.86:3260
The iSCSI connection is not initiated until the discovery method is enabled. See the next step.
If you have configured a dynamically discovered (SendTargets) device, configure the SendTargets discovery method.
initiator# iscsiadm add discovery-address 10.10.46.83:3260
If you have configured a dynamically discovered (iSNS) device, configure the iSNS discovery method.
initiator# iscsiadm add isns-server 10.10.46.82
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
initiator# devfsadm -i iscsi
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 any 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.
initiator# format AVAILABLE DISK SELECTIONS: 0. c3t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,700000/scsi@2/sd@0,0 1. c3t1d0 <HITACHI-DK32EJ36NSUN36G-PQ0B-33.92GB> /pci@1f,700000/scsi@2/sd@1,0 2. c3t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,700000/scsi@2/sd@2,0 3. c3t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> /pci@1f,700000/scsi@2/sd@3,0 4. c13t600144F0C49A050000004CC84BE20001d0 <SUN-COMSTAR-1.0 cyl 16382 alt 2 hd 8 sec 32> /scsi_vhci/ssd@g600144f0c49a050000004cc84be20001
In the above format output, disks 0–3 are local disks. Disk 4 is an iSCSI LUN under MPxIO control.
initiator# zpool create pool-name c13t600144F0C49A050000004CC84BE20001d0 initiator# zfs create pool-name/fs-name
Follow the steps below to access iSCSI disks after the system is rebooted. This procedure assumes that you are logged into the initiator.
initiator# vi /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/dsk/device-name - /mnt ufs - iscsi -
Use this procedure to restrict logical units 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 logical units to the same host group.
For information on configuring a target group, see stmfadm(1M).
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 . . .
target# stmfadm create-hg host-a 210000e08b195dae 210100e08b395dae
target# stmfadm add-hg-member -g host-a
target# stmfadm create-tg targets-0
Each SCSI target can be a member of only one target group.
target# stmfadm add-tg-member -g targets-0 wwn.guid-number
target# stmfadm list-lu -v
target# stmfadm add-view -h host-a -t targets-0 -n 1 guid-number
Setting up authentication for your iSCSI devices is optional.
In a secure environment, authentication is not required because only trusted initiators can access the targets.
In a less secure environment, the target cannot determine if a connection request is truly from a given host. In that case, the target can authenticate an initiator by using the Challenge-Handshake Authentication Protocol (CHAP).
CHAP authentication uses the notion of a challenge and response, which means that the target challenges the initiator to prove its identity. For the challenge/response method to work, the target must know the initiator's secret key, and the initiator must be set up to respond to a challenge. Refer to the array vendor's documentation for instructions on setting up the secret key on the array.
iSCSI supports unidirectional and bidirectional authentication:
Unidirectional authentication enables the target to authenticate the identity of the initiator.
Bidirectional authentication adds a second level of security by enabling the initiator to authenticate the identity of the target.
This procedure assumes that you are logged in to the local system where you want to securely access the configured iSCSI target device.
For more information, see How to Obtain Administrative Rights in System Administration Guide: Security Services.
Unidirectional authentication, the default method, enables the target to validate the initiator. Complete steps 3–5 only.
Bidirectional authentication adds a second level of security by enabling the initiator to authenticate the target. Complete steps 3–9.
For example, the following command initiates a dialogue to define the CHAP secret key.
initiator# iscsiadm modify initiator-node --CHAP-secret
Note - The CHAP secret length must be a minimum of 12 characters and a maximum of 16 characters.
By default, the initiator's CHAP name is set to the initiator node name.
You can use the following command to change the initiator's CHAP name.
initiator# iscsiadm modify initiator-node --CHAP-name new-CHAP-name
In the Solaris environment, the CHAP name is always set to the initiator node name by default. The CHAP name can be set to any length text that is less than 512 bytes. The 512-byte length limit is a Solaris limitation. However, if you do not set the CHAP name, it is set to the initiator node name upon initialization.
initiator# iscsiadm modify initiator-node --authentication CHAP
CHAP requires that the initiator node have both a user name and a password. The user name is typically used by the target to look up the secret for the given username.
Bidirectional CHAP – Enable bidirectional authentication parameters.
For example:
initiator# iscsiadm modify target-param -B enable target-iqn
Disable bidirectional CHAP. For example:
initiator# iscsiadm modify target-param -B disable target-iqn
For example:
initiator# iscsiadm modify target-param --authentication CHAP target-iqn
For example, the following command initiates a dialogue to define the CHAP secret key:
initiator# iscsiadm modify target-param --CHAP-secret target-iqn
By default, the target's CHAP name is set to the target name.
You can use the following command to change the target's CHAP name:
initiator# iscsiadm modify target-param --CHAP-name target-CHAP-name
This procedure assumes that you are logged in to the local system that contains the iSCSI targets.
Unidirectional authentication is the default method, complete steps 3-5 only.
Bidirectional authentication, complete steps 3-7.
Create the initiator context with the initiator's full node name and with the initiator CHAP secret.
target# itadm modify-target -a chap target-iqn
Create the initiator context with the initiator's full node name and with the initiator CHAP secret.
target# itadm create-initiator -s initiator-iqn Enter CHAP secret: ********* Re-enter secret: *********
target# itadm modify-initiator -u initiator-CHAP-name initiator-iqn
target# itadm modify-target -s target-iqn Enter CHAP secret: ********* Re-enter secret: *********
target# itadm modify-target -u target-CHAP-name target-iqn
You can use a third-party RADIUS server to simplify CHAP secret management. A RADIUS server is a centralized authentication service. While you must still specify the initiator's CHAP secret, you are no longer required to specify each target's CHAP secret on each initiator when using bidirectional authentication with a RADIUS server.
For more information, see:
This procedure assumes that you are logged in to the local system where you want to securely access the configured iSCSI target device.
For example:
initiator# iscsiadm modify initiator-node --radius-server 10.0.0.72:1812
initiator# iscsiadm modify initiator-node --radius-shared-secret
Note - The Solaris iSCSI implementation requires that the RADIUS server is configured with a shared secret before the Solaris iSCSI software can interact with the RADIUS server.
initiator# iscsiadm modify initiator-node --radius-access enable
This section describes the error messages that are related to a Solaris iSCSI and RADIUS server configuration, along with potential solutions for recovery.
empty RADIUS shared secret
Cause: The RADIUS server is enabled on the initiator, but the RADIUS shared secret is not set.
Solution: Configure the initiator with the RADIUS shared secret. For more information, see How to Configure RADIUS for Your iSCSI Configuration.
WARNING: RADIUS packet authentication failed
Cause: The initiator failed to authenticate the RADIUS data packet. This error can occur if the shared secret configured on the initiator node is different from the shared secret on the RADIUS server.
Reconfigure the initiator with the correct RADIUS shared secret. For more information, see How to Configure RADIUS for Your iSCSI Configuration.
The iSCSI boot requirements are as follows:
Hardware
SPARC — A sun4v system with Open Boot PROM version 4.32 and a NIC that supports iSCSI booting
x86 — A NIC that supports iSCSI booting. Currently, you must install iBFT Boot ROM image to update the NIC to support iSCSI booting. Intel NICs with iBFT support are as follows:
All Intel PCI-Express based server adapters support Solaris releases
http://www.intel.com/support/network/adapter/pro100/sb/CS-028681.htm
Steps for updating NIC would be here.
Software
Oracle Solaris Express build 127 at least. See xxx for upgrading your Open Solaris 2009.06 system to Oracle Solaris Express build 151a.
The general process for booting and installing Solaris from an iSCSI LUN is as follows:
Ensure that your SPARC or x86 system supports iSCSI booting
Configure DHCP — If you are using the automated installation, you can use the iSCSI/DHCP keywords to identify the iSCSI parameter source from DHCP. For more information, see xxx below.
Configure the iSCSI LUN — the iSCSI LUN must be available and accessible so that it can be accessed during the installation
Select a Solaris installation method:
Automated installation — Provides the target_device keyword that you can use to configure iSCSI target device information. You identify the iSCSI target device that is selected during the automated installation process by configuring iSCSI target information by using the target_device keyword.
Review the following issues before using the automated installation method:
Security issue — CHAP password for iSCSI device cannot be transmitted securely to an install client during an automated installation. This is CR 7004754.
Two NICs can be used with automated installation as follows:
Use PXE boot for x86 installation
iSCSI boot should use NIC with iBFT support
PXE and iBFT may not coexist on one NIC due to ROM size
Disable the NWAM services — This is CR 6974162.
Solaris LiveCD installation — Open a shell window to configure iSCSI device access during the installation. Complete the installation and disable the NWAM service to complete the boot process.
Solaris text installation — Select the Shell option from the installation menu to configure iSCSI device access. Complete the installation and disable the NWAM service to complete the boot process.
LiveCD
Text installation
Automated installation
The steps below include the selected installation method so be sure that you follow the instructions for the selected installation method. For example, in steps 3, 4, or 5, you configure the iSCSI LUN based on the selected installation method.
Add the following keywords to the installation manifest to identify that the iSCSI target information is provided by DHCP.
<target_device_iscsi_parameter_source>DHCP</target_device_iscsi_parameter_source>
target_device_iscsi_target_name
target_device_iscsi_target_ip
target_device_iscsi_target_port
target_device_iscsi_target_lun
Starting in b144 and higher, the var/ai/<port_number>/AI_data/default.xml file contains the following section to enable the NWAM service:
<service name="network/physical" version="1" type="service"> <instance name="nwam" enabled="true"/> <instance name="default" enabled="false"/></service>
You can determine the port-number value in the following way:
# installadm list -n <install_service>
Modify the default.xml manifest to disable NWAM as follows:
<instance name="nwam" enabled="false"/> <instance name="default" enabled="true"/>
# iscsiadm add discovery-address iscsi-target-ip
# iscsiadm modify discovery -t enable
# iscsiadm list target -S
Then, continue the installation.
From a terminal or shell window, manually mount the new boot environment, edit the network service configuration, and unmount the BE prior to booting as follows:
# beadm mount solaris /a # svccfg svc:> repository /a/etc/svc/repository.db svc:> select nwam svc:/network/physical/nwam:> setprop general/enabled=false svc:/network/physical/nwam:> unselect svc:/network/physical> select network/physical:default svc:/network/physical:default> setprop general/enabled=true svc:/network/physical:default> unselect svc:/network/physical> exit # beadm umount solaris # init 6
# iscsiadm add discovery-address iscsi-target-ip
# iscsiadm modify discovery -t enable
# iscsiadm list target -S
Then, continue the installation.
From a terminal or shell window, manually mount the new boot environment, edit the network service configuration, and unmount the BE prior to booting as follows:
# beadm mount solaris /a # svccfg svc:> repository /a/etc/svc/repository.db svc:> select nwam svc:/network/physical/nwam:> setprop general/enabled=false svc:/network/physical/nwam:> unselect svc:/network/physical> select network/physical:default svc:/network/physical:default> setprop general/enabled=true svc:/network/physical:default> unselect svc:/network/physical> exit # beadm umount solaris # init 6
For example, configure an Intel NIC as follows:
From the system setup menu, select the NIC as the first device for the Boot Drive Order option.
If successful, you will see adapter initialization messages and then the iSCSI target IP address information. Next, you will see the Oracle Solaris 11 GRUB menu.
The system stops at the ok prompt after the system installation is complete. You must manually enter the required iSCSI boot information to boot the system. This is CR 6945884.
For example, configure an Intel NIC as follows:
boot net:iscsi-target-IP=target-IP, iscsi-target-name=target-name, host-ip=host-ip [,router-ip=router-ip] [,subnet-mask=mask-ip] [,iscsi-port=dest-port] [,iscsi-lun=lun] [,iscsi-partition=partition]
For example:
ok boot net:iscsi-target-ip=10.13.21.227,iscsi-target-name=iqn.1986-03.com.sun :02:zhaobing,host-ip=10.13.49.129,iscsi-lun=0,router-ip=10.13.149.1
From the system setup menu, select the NIC as the first device for the Boot Drive Order option.
If successful, you will see adapter initialization messages and then the iSCSI target IP address information. Next, you will see the Oracle Solaris 11 GRUB menu.
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.
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
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.
For example:
initiator# itadm delete-target target-IQN
You can display information about the iSCSI initiator and target devices by using the iscsiadm list command.
For example:
# iscsiadm list initiator-node Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c Initiator node alias: zzr1200 Login Parameters (Default/Configured): Header Digest: NONE/- Data Digest: NONE/- Authentication Type: NONE RADIUS Server: NONE RADIUS access: unknown Configured Sessions: 1
For example:
# iscsiadm list discovery Discovery: Static: enabled Send Targets: enabled iSNS: enabled
Example 14-1 Displaying iSCSI Target Information
The following example shows how to display the parameter settings for a specific iSCSI target.
# iscsiadm list target-param iqn.1992-08.com.abcstorage:sn.33592219 Target: iqn.1992-08.com.abcstorage:sn.33592219
The iscsiadm list target-param -v command displays the following information:
The authentication settings for the target
The default settings for the target login parameters
The configured value for each login parameter
The iscsiadm list target-param -v command displays the default parameter value before the / designator and the configured parameter value after the / designator. If you have not configured any parameters, the configured parameter value displays as a hyphen (-). For more information, see the following examples.
# iscsiadm list target-param -v eui.50060e8004275511 Target: eui.50060e8004275511 Alias: - Bi-directional Authentication: disabled Authentication Type: NONE Login Parameters (Default/Configured): Data Sequence In Order: yes/- Data PDU In Order: yes/- Default Time To Retain: 20/- Default Time To Wait: 2/- Error Recovery Level: 0/- First Burst Length: 65536/- Immediate Data: yes/- Initial Ready To Transfer (R2T): yes/- Max Burst Length: 262144/- Max Outstanding R2T: 1/- Max Receive Data Segment Length: 65536/- Max Connections: 1/- Header Digest: NONE/- Data Digest: NONE/- Configured Sessions: 1
The following example output displays the parameters that were negotiated between the target and the initiator.
# iscsiadm list target -v eui.50060e8004275511 Target: eui.50060e8004275511 TPGT: 1 ISID: 4000002a0000 Connections: 1 CID: 0 IP address (Local): 172.90.101.71:32813 IP address (Peer): 172.90.101.40:3260 Discovery Method: Static Login Parameters (Negotiated): Data Sequence In Order: yes Data PDU In Order: yes Default Time To Retain: 0 Default Time To Wait: 3 Error Recovery Level: 0 First Burst Length: 65536 Immediate Data: yes Initial Ready To Transfer (R2T): yes Max Burst Length: 262144 Max Outstanding R2T: 1 Max Receive Data Segment Length: 65536 Max Connections: 1 Header Digest: NONE Data Digest: NONE
You can modify parameters on both the iSCSI initiator and the iSCSI target device. However, the only parameters that can be modified on the iSCSI initiator are the following:
iSCSI initiator node name – You can change the initiator node name to a different name. If you change the initiator node name, the targets that were discovered by iSNS might be removed from the initiator's target list, depending on the discovery domain configuration on the iSNS server at the time when the name was changed. For more information, see How to Modify iSCSI Initiator and Target Parameters.
Header digest – NONE, the default value or CRC32.
Data digest – NONE, the default value or CRC32.
Authentication and CHAP secret – For more information about setting up authentication, see How to Configure CHAP Authentication for Your iSCSI Initiator.
The iSCSI driver provides default values for the iSCSI initiator and iSCSI target device parameters. If you modify the parameters of the iSCSI initiator, the modified parameters are inherited by the iSCSI target device, unless the iSCSI target device already has different values.
Caution - Ensure that the target software supports the parameter to be modified. Otherwise, you might be unable to log in to the iSCSI target device. See your array documentation for a list of supported parameters. |
Modifying iSCSI parameters should be done when I/O between the initiator and the target is complete. The iSCSI driver reconnects the session after the changes are made by using the iscsiadm modify command.
You can tune the timeout length for iSCSI connections with the iscsiadm modify -T command. These tunable parameters apply to the active connection, and change the behavior of the iSCSI initiator and the targets that connect to the initiator. The ability to dynamically tune parameters provides flexibility when configuring your iSCSI initiators.
You can tune the following iSCSI parameters.
Table 14-1 iSCSI Tunable Parameters
|
# iscsiadm list initiator-node
# iscsiadm list target-param [target-name]
For example:
# iscsiadm list initiator-node
# iscsiadm modify target-param -T tunable-prop=value target-name
For example, to set the maximum connection retry time to 90 seconds, use syntax similar to the following:
# iscsiadm modify initiator-node -T conn-login-max=90
The first part of this procedure illustrates how modified parameters of the iSCSI initiator are inherited by the iSCSI target device. The second part of this procedure shows how to actually modify parameters on the iSCSI target device.
This optional procedure assumes that you are logged in to the local system where access to an iSCSI target device has already been configured.
initiator# iscsiadm list initiator-node Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c Initiator node alias: zzr1200 Login Parameters (Default/Configured): Header Digest: NONE/- Data Digest: NONE/- Authentication Type: NONE RADIUS Server: NONE RADIUS access: unknown Configured Sessions: 1
initiator# iscsiadm list target-param -v iqn.1992-08.com.abcstorage:sn.84186266 Target: iqn.1992-08.com.abcstorage:sn.84186266 Alias: - Bi-directional Authentication: disabled Authentication Type: NONE Login Parameters (Default/Configured): Data Sequence In Order: yes/- Data PDU In Order: yes/- Default Time To Retain: 20/- Default Time To Wait: 2/- Error Recovery Level: 0/- First Burst Length: 65536/- Immediate Data: yes/- Initial Ready To Transfer (R2T): yes/- Max Burst Length: 262144/- Max Outstanding R2T: 1/- Max Receive Data Segment Length: 65536/- Max Connections: 1/- Header Digest: NONE/- Data Digest: NONE/- Configured Sessions: 1
Note that both header digest and data digest parameters are currently set to NONE for both the iSCSI initiator and the iSCSI target device.
To review the default parameters of the iSCSI target device, see the iscsiadm list target-param output in Example 14-1.
For example, set the header digest to CRC32.
initiator# iscsiadm modify initiator-node -h CRC32
If you change the initiator node name, the targets that were discovered by iSNS might be logged out and removed from the initiator's target list, if the new name does not belong to the same discovery domain as that of the targets. However, if the targets are in use, they are not removed. For example, if a file is open or a file system is mounted on these targets, the targets will not removed.
You might also see new targets after the name change if these targets and the new initiator node name belong to the same discovery domain.
initiator# iscsiadm list initiator-node Initiator node name: iqn.1986-03.com.sun:01:0003ba4d233b.425c293c Initiator node alias: zzr1200 Login Parameters (Default/Configured): Header Digest: NONE/CRC32 Data Digest: NONE/- Authentication Type: NONE RADIUS Server: NONE RADIUS access: unknown Configured Sessions: 1
Note that the header digest is now set to CRC32.
initiator# iscsiadm list target-param -v iqn.1992-08.com.abcstorage:sn.84186266 Target: iqn.1992-08.com.abcstorage:sn.84186266 Alias: - Bi-directional Authentication: disabled Authentication Type: NONE Login Parameters (Default/Configured): Data Sequence In Order: yes/- Data PDU In Order: yes/- Default Time To Retain: 20/- Default Time To Wait: 2/- Error Recovery Level: 0/- First Burst Length: 65536/- Immediate Data: yes/- Initial Ready To Transfer (R2T): yes/- Max Burst Length: 262144/- Max Outstanding R2T: 1/- Max Receive Data Segment Length: 65536/- Max Connections: 1/- Header Digest: CRC32/- Data Digest: NONE/- Configured Sessions: 1
Note that the header digest is now set to CRC32.
initiator# iscsiadm list target -v iqn.1992-08.com.abcstorage:sn.84186266 Target: iqn.1992-08.com.abcstorage:sn.84186266 TPGT: 2 ISID: 4000002a0000 Connections: 1 CID: 0 IP address (Local): nnn.nn.nn.nnn:64369 IP address (Peer): nnn.nn.nn.nnn:3260 Discovery Method: SendTargets Login Parameters (Negotiated): . . . Header Digest: CRC32 Data Digest: NONE
You can unset a parameter by setting it back to its default setting by using the iscsiadm modify command. Or, you can use the iscsiadm remove command to reset all target properties to the default settings.
The iscsiadm modify target-param command changes only the parameters that are specified on the command line.
The following example shows how to reset the header digest to NONE:
initiator# iscsiadm modify target-param -h none iqn.1992-08.com.abcstorage:sn...
For information about the iscsiadm remove target-param command, see iscsiadm(1M).