Linux on System z: iSCSI Initiator Configuration



Linux on System z: iSCSI Initiator Configuration Note Before using this information and the product it supports, read the information in “Notices” on page 27. Contents

Figures ...... v Discovering iSCSI targets using Send Targets . . . 12 Logging in to discovered targets ...... 13 About this publication ...... vii Logging out from targets ...... 13 Discovering and logging in to targets using YaST (SUSE-specific) ...... 13 Chapter 1. Introduction ...... 1 Logging out from iSCSI targets using YaST iSCSI initiators and targets...... 1 (SUSE-specific) ...... 19 Generating an iSCSI qualified name ...... 2 Automatic iSCSI target discovery and login (persistent across subsequent reboots) .....22 Chapter 2. Setting up iSCSI at the Avoiding data corruption or loss ...... 23 Storwize V7000 clustered system ....3 Creating an iSCSI host on Storwize V7000 ....3 References ...... 25 Mapping iSCSI volumes to the iSCSI host on the Storwize V7000 system ...... 8 Notices ...... 27 Trademarks ...... 29 Chapter 3. Setting up iSCSI initiator Terms and conditions ...... 29 software on Linux on System z ....11 Installing iSCSI initiator software on Linux on Index ...... 31 System z ...... 11 Setting the iSCSI qualified name for the Linux host 12

© Copyright IBM Corp. 2013 iii iv Linux on System z: iSCSI Initiator Configuration Figures

1. iSCSI architecture ...... 1 12. Volume mapped successfully...... 10 2. iSCSI host connection to Storwize V7000 over 13. List of iSCSI volumes with updated Host Ethernet network ...... 2 Mappings information ...... 10 3. No iSCSI host on Storwize V7000 .....4 14. iSCSI Initiator Overview window .....14 4. Create Host window ...... 4 15. iSCSI Initiator Discovery window .....15 5. Entering host name details ...... 5 16. iSCSI Initiator Discovery ...... 16 6. Adding iSCSI ports ...... 6 17. Select No Authentication ...... 17 7. Port definitions...... 7 18. Target is connected ...... 18 8. Create Host window - host is successfully 19. Connected targets ...... 19 completed ...... 8 20. Connected Targets ...... 20 9. Overview ...... 8 21. Click Continue to confirm log out...... 21 10. Listed iSCSI volumes...... 9 22. Successful logout...... 22 11. Mapped volumes ...... 9

© Copyright IBM Corp. 2013 v vi Linux on System z: iSCSI Initiator Configuration About this publication

This white paper describes the basic configuration of Small Computer Systems interface (iSCSI) initiator when Storwize® V7000 used as a iSCSI target. This white paper is written on the basis of SUSE Linux Enterprise 11 SP2 and Red Hat Enterprise Linux 6.4 results.

To provide a more complete picture of the configuration used in this white paper the iSCSI setup at Storwize V7000 is also briefly described.

The following IBM® storage products support iSCSI: v IBM Storwize V7000 v IBM XIV® Storage System v IBM System Storage® DS5000 Series v IBM System Storage DS5020 Express® v IBM System Storage DCS3700 v IBM Storwize V3700 v IBM System Storage v DS3500 Express

Linux on System z® supports the following SCSI transports: v Protocol (FCP), mapping of SCSI over Fibre Channel v iSCSI, mapping of SCSI over TCP/IP

FCP provides faster and more reliable access as compared to the iSCSI transport. But iSCSI is more cost effective than FCP.

Scope of this document

Advanced topics such as iSCSI multipath and iSCSI security are out of the scope of this document

Note: Although multipathing is not described in this document, it is strongly recommended for production environments.

Author

Deepak P Joshi

Linux on System z Prerequisites v Red Hat Enterprise Linux 6 or SUSE Linux Enterprise Server 11 distribution installed on System z with the network configured. There must be connectivity between the Linux system and Storwize V7000. Linux on System z supports the following types of network connection: – Network connections through Open Systems Adapter (OSA) - works in Layer-2 or Layer-3 mode – HiperSockets

© Copyright IBM Corp. 2013 vii – GuestLAN – Virtual Switch Even though the above network connections are supported, the network connection must be configured through OSA either in Layer-2 or Layer-3 mode for the iSCSI configuration. In the z/VM® environment the Virtual Switch network connection with rdev option enabled can also be used for the iSCSI configuration. HiperSockets™ and GuestLAN network connections cannot be used for the iSCSI configuration. For more information about network connections with Linux on System z, see Device Drivers, Features and Commands: – Reference for SUSE Linux Enterprise Server 11 SP2: http://www.ibm.com/developerworks/linux/linux390/documentation_suse.html#sles11sp2 – Reference for Red Hat Enterprise Linux 6.4: http://www.ibm.com/developerworks/linux/linux390/documentation_red_hat.html#rhel64 v Storwize V7000 already configured with iSCSI LUNs and iSCSI target (iSCSI host object) created and mapped with iSCSI LUNs. v The IP address of the iSCSI portal and IQN of iSCSI target (iSCSI host object) at Storwize V7000 Restrictions v Storwize V7000 supports only one iSCSI session between an initiator and target at a time v There is no support for ipl'ng from Linux on system z

viii Linux on System z: iSCSI Initiator Configuration Chapter 1. Introduction

A brief introduction to the architecture of the Internet Small Computer System Interface (iSCSI) standard.

iSCSI is a standard for IP-based (TCP/IP) storage networking, which allows SCSI commands to be transferred over an IP-based network. It also facilitates the -level transfer of SCSI commands over IP (TCP/IP) network. The architecture of iSCSI is similar to that of a client/server architecture, where an initiator acts as the client that issues an I/O request and the target (a device in the storage system) acts as a server. Distance extension can be achieved by this architecture when used over IP networks.

There are two kinds of iSCSI initiators: v Software-based initiator v Hardware-based initiator The software-based initiator is a driver that pairs the network interface driver and the SCSI block-level driver together to handle the iSCSI requests. A hardware-based initiator is an iSCSI Host Bus Adapter (HBA), which is similar to Network Interface Controller (NIC) with an on-board Application-Specific Integrated Circuit (ASIC) to offload iSCSI work from the system CPU. System z uses the software-based iSCSI initiator which in turn means it does not support the offloading of iSCSI work.

TCP/IP network

iSCSI initiator iSCSI target

Figure 1. iSCSI architecture iSCSI initiators and targets A Network Interface Controller (NIC) on System z attached to an IP (TCP/IP) network acts as an iSCSI initiator which initiates I/O requests to and receives responses from iSCSI target. In this case the target is Storwize V7000.

iSCSI targets are the devices, which provide the response to iSCSI commands received from the iSCSI initiators over the IP (TCP/IP) Network. On Storwize V7000, one or both of its node Ethernet ports are configured to become iSCSI target.

Initiators and targets are given a unique ASCII name with a size of 233 bytes known as iSCSI Qualified Name (IQN). IQN is worldwide unique name which is used to identify each initiator and target.

© Copyright IBM Corp. 2013 1 Figure 2. iSCSI host connection to Storwize V7000 over Ethernet network

Figure 2 courtesy of Storwize V7000 Information Development. For more information about Storwize V7000, see: http://pic.dhe.ibm.com/infocenter/storwize/ic/index.jsp

Generating an iSCSI qualified name A unique iSCSI qualified name (IQN) can be generated by the utility iscsi-iname and it is generated every time you invoke iscsi-iname.

This IQN can be used to configure iSCSI initiator and the iSCSI target.

Note: The IQN should be the same at both the iSCSI initiator and iSCSI target.

Example: # iscsi-iname iqn.2012-02.com.ibm.de.boeblingen:01:c5f446d488f4

2 Linux on System z: iSCSI Initiator Configuration Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system

The iSCSI setup at Storwize V7000 is briefly described for the completeness of this document.

It is assumed that the storage administrator has already set up the Storwize V7000 clustered system. 1. Get the iSCSI Qualified Name (IQN) for the Linux host system and iSCSI portal IP address from the Storwize V7000 storage administrator. 2. Configure IPv4 or IPv6 addresses for the system Ethernet ports on the nodes that are in the I/O groups that use the iSCSI volumes. 3. Create iSCSI volumes on the Storwize V7000 system. 4. Create a host object on the Storwize V7000 system server that describes the iSCSI server initiator to which the volumes are to be mapped, see “Creating an iSCSI host on Storwize V7000.” 5. Map the volume to the host object in the Storwize V7000 system, see “Mapping iSCSI volumes to the iSCSI host on the Storwize V7000 system” on page 8. Considerations v Each connection between a host initiator and a Storwize V7000 system Ethernet port can use either IPv4 or Ipv6. Concurrent use of both IPv4 and Ipv6 is not supported. v Storwize V7000 Ethernet ports 1 and 2 can each be configured for both a cluster IP address and an iSCSI target IP address. v A different cluster IP address can be assigned to each system Ethernet port, thus providing a configuration with redundant Ethernet networks. v All service and configuration IP addresses associated with a clustered-system Ethernet port must be on the same subnet across all nodes. Each port can reside in its own subnet. v When the host object on the Storwize V7000 system side is created or recreated for an iSCSI host, you must log out of any existing sessions from that host and then log back in.

Referenced from: http://pic.dhe.ibm.com/infocenter/storwize/ic/index.jsp

Creating an iSCSI host on Storwize V7000 Create a host object on the Storwize V7000 system server that describes the iSCSI server target to which the volumes are to be mapped. Procedure 1. Log in to Storwize V7000 and go to Home > Overview. There are no iSCSI hosts on Storwize V7000 (0 iSCSI Hosts) as shown in Figure 3 on page 4.

© Copyright IBM Corp. 2013 3 Figure 3. No iSCSI host on Storwize V7000

2. To create an iSCSI host object, click Hosts > Hosts > New Hosts. Select iSCSI Hosts as shown in Figure 4.

Figure 4. Create Host window

The window as shown in Figure 5 on page 5 is displayed.

4 Linux on System z: iSCSI Initiator Configuration Figure 5. Entering host name details

3. Enter the host name in Host Name and the IQN in iSCSI Ports. Click Add Port to List as shown in the Figure 6 on page 6.

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 5 Figure 6. Adding iSCSI ports

4. The IQN is added to Port Definitions, see Figure 7 on page 7.

6 Linux on System z: iSCSI Initiator Configuration Figure 7. Port definitions

5. Click Create Host to create the iSCSI host. Figure 8 on page 8 is displayed if the iSCSI host is successfully created.

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 7 Figure 8. Create Host window - host is successfully completed

6. Go to Home > Overview. Figure 9 shows that the iSCSI host is available on Storwize V7000 (1 iSCSI Host).

Figure 9. Overview

Mapping iSCSI volumes to the iSCSI host on the Storwize V7000 system Complete this procedure to map iSCSI volumes to the iSCSI host on the Storwize V7000 system. Procedure 1. Click Volumes > Volumes on Storwize V7000, The iSCSI volumes are displayed as shown in Figure 10 on page 9. Because no iSCSI volumes are mapped to any of the iSCSI hosts, Host mappings shows No against listed iSCSI volumes.

8 Linux on System z: iSCSI Initiator Configuration Figure 10. Listed iSCSI volumes

2. Right click iSCSI volume, select map to host. The Modify Host Mapping window is displayed. 3. Select iSCSI host from the Host drop-down menu to display the next window. 4. Select iSCSI volume from theUnmapped Volumes pane and click right arrow. The iSCSI volume is now mapped and is displayed in the Volumes mapped to the Host panel as shown in Figure 11.

Figure 11. Mapped volumes

5. Click Apply to display the Modify Mappings window. The iSCSI volume has been successfully mapped to the iSCSI host as shown in Figure 12 on page 10.

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 9 Figure 12. Volume mapped successfully

6. Click Volumes > Volumes. Host Mappings in Figure 13 shows that the iSCSI volume has been mapped to the iSCSI host.

Figure 13. List of iSCSI volumes with updated Host Mappings information

10 Linux on System z: iSCSI Initiator Configuration Chapter 3. Setting up iSCSI initiator software on Linux on System z

This section describes how to install iSCSI initiator software on Linux on System z, how to set the iSCSI qualified name for Linux host, and how to discover iSCSI targets

Installing iSCSI initiator software on Linux on System z This section describes how to install the iSCSI initiator software on Linux on System z. Before you begin

Ensure that you have the latest release of the initiator software from the Linux distribution vendor which supports the Storwize V7000 system (iSCSI target). About this task

The initiator software on Red Hat Enterprise Linux systems is packaged as iscsi-initiator-utils. The initiator software on SUSE Linux Enterprise Server systems is packaged as open-iscsi. Procedure 1. For Red Hat Enterprise Linux (RHEL 6) # rpm -qa |grep iscsi-initiator-utils iscsi-initiator-utils-6.2.0.873-2.el6.s390x If the package is not installed: #rpm -ivh

or #yum install iscsi-initiator-utils For SUSE Linux Enterprise Server (SLES 11) # rpm -qa | grep open-iscsi open-iscsi-2.0.872-0.35.1 If the package is not installed: #rpm -ivh

or #zypper install open-iscsi 2. To manage the software, use the chkconfig and service commands. The service for Red Hat Enterprise Linux systems is iscsid. The service for SUSE Linux Enterprise Server is open-iscsi. The following examples are for Red Hat Enterprise Linux and SUSE Linux Enterprise Server. For Red Hat Enterprise Linux (RHEL 6) # chkconfig | grep iscsid iscsid 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# chkconfig iscsid on

# chkconfig | grep iscsid

© Copyright IBM Corp. 2013 11 iscsid 0:off 1:off 2:on 3:on 4:on 5:on 6:off

# /etc/init.d/iscsi start Starting iscsi: [ OK ] For SUSE Linux Enterprise Server (SLES 11) # chkconfig --list |grep iscsi open-iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# insserv open-iscsi

# chkconfig --list |grep iscsi open-iscsi 0:off 1:off 2:off 3:on 4:off 5:on 6:off

# /etc/init.d/open-iscsi start Loading iscsi modules: tcp done Starting iSCSI initiator service: done Setting up iSCSI targets: unused

or #rcopen-iscsi start Loading iscsi modules: tcp done Starting iSCSI initiator service: done Setting up iSCSI targets: unused 3. Use the default settings for the iSCSI initiator. These settings are described in /etc/iscsi/iscsid.conf.

Setting the iSCSI qualified name for the Linux host This section describes how to specify the iSCSI qualified name (IQN) for the Linux host.

The initiator name that you choose must match the iSCSI name given to the Storwize V7000 host object for this system.

Edit the /etc/iscsi/initiatorname.iscsi file to specify the IQN name. The following example shows a sample name: InitiatorName=iqn.2012-02.com.ibm.de.boeblingen:01:c5f446d488f4

After you have changed the initiator name, you must restart the iSCSI-initiator service.

Discovering iSCSI targets using Send Targets This section describes how to discover iSCSI target portals using the SendTargets method.

This command returns the iSCSI qualified name (IQN) and target portals associated with the Storwize V7000 system node.

Run the discovery command on linux host: iscsiadm --mode discovery --type sendtargets --portal 192.0.2.*

where 192.0.2.* is the IP address of the iSCSI target on the Storwize V7000 clustered system.

When you use the discovery command, you can substitute: v -m for --mode

12 Linux on System z: iSCSI Initiator Configuration v -t for --type v -p for --portal # iscsiadm --mode discovery --type sendtargets --portal 192.0.2.* 192.0.2.*:3260,1 iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1

Logging in to discovered targets This section describes how to connect to a specific portal on a discovered target.

The Storwize V7000 system supports only one iSCSI session between an initiator and a target.

On the Linux host, use the following command to log on to the Storwize V7000 system target: iscsiadm --mode node --target --portal 192.0.2.* --login # iscsiadm --mode node --target iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1 --portal 192.0.2.* --login Logging in to [iface: default, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] (multiple) Login to [iface: default, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] successful.

When the login command completes, the device nodes for the Storwize V7000 system volumes that are mapped to the host are created on Linux host system. # lsscsi [2:0:0:0] disk IBM 2145 0000 /dev/sda [2:0:0:1] disk IBM 2145 0000 /dev/sdb

Logging out from targets This section describes how to log out from a specific target or from all established sessions.

After you log out from a Storwize V7000 system target, the iSCSI volumes that it serves are no longer available to the host.

To log out from a specific Storwize V7000 system target, run the following command: iscsiadm --mode node --target --portal 192.0.2.* --logout

To log out from all your established sessions, run the following command: iscsiadm --mode node --logoutall=all # iscsiadm --mode node --target iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1 --portal 192.0.2.* --logout Logging out of session [sid: 2, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] Logout of [sid: 2, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] successful. iscsiadm --mode node --logoutall=all Logging out of session [sid: 5, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] Logout of [sid: 5, target: iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1, portal: 192.0.2.*,3260] successful.

Discovering and logging in to targets using YaST (SUSE-specific) Complete the steps in the following procedure to connect to targets.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 13 Procedure 1. As a root user, launch YaST 2. Select Network Services > iSCSI Initiator. a. Select Service as shown in Figure 14. b. In Service Start, select Manually. c. In Initiator Name, specify the iSCSI Qualified Name (IQN). d. Click OK. .

Figure 14. iSCSI Initiator Overview window

3. Select Discovered Targets > Add. a. In IP Address, specify the IP address of the iSCSI portal. b. In Port, specify the iSCSI port. c. Select No Authentication.

14 Linux on System z: iSCSI Initiator Configuration Figure 15. iSCSI Initiator Discovery window

4. Click Next to discover the target as show in Figure 16 on page 16.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 15 Figure 16. iSCSI Initiator Discovery

5. Click Connect. 6. Click No Authentication as shown in Figure 17 on page 17.

16 Linux on System z: iSCSI Initiator Configuration Figure 17. Select No Authentication

7. Click Next to confirm connected is true as shown in Figure 18 on page 18.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 17 Figure 18. Target is connected

8. Click Connect. The window is displayed as shown in Figure 19 on page 19.

18 Linux on System z: iSCSI Initiator Configuration Figure 19. Connected targets Results

The iSCSI devices are discovered and available on the system: # lsscsi [0:0:0:0] disk IBM 2145 0000 /dev/sda

Logging out from iSCSI targets using YaST (SUSE-specific) Complete the steps in this procedure to log out from iSCSI targets. Procedure 1. As root user launch YaST. 2. Select Network Services > SCSI Initiator. 3. Go to Connected Targets as shown in Figure 20 on page 20.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 19 Figure 20. Connected Targets

4. Click Log Out, then click Continue to confirm that you want to log out from the target as shown in Figure 21 on page 21.

20 Linux on System z: iSCSI Initiator Configuration Figure 21. Click Continue to confirm log out.

5. Figure 22 on page 22 shows that you successfully logged out from the target.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 21 Figure 22. Successful logout

6. Run the iscsi command to confirm that the iSCSI devices have been removed from the system.

Automatic iSCSI target discovery and login (persistent across subsequent reboots) You can configure iscsid to discover the iSCSI target and to log in to the iSCSI target automatically. About this task

When iscsid starts, it checks the SendTarget discovery records. The steps are as follows: Procedure 1. For the iSCSI initd script startup, set a session to "automatic" in /etc/iscsi/iscsid.conf: node.startup = automatic

By default node.startup is set to:

22 Linux on System z: iSCSI Initiator Configuration v automatic in Red Hat Enterprise Linux v manual in SUSE Linux Enterprise Server 2. Create the SendTargets record: # iscsiadm --mode node --target --portal 192.0.2.*:3260 -o new 3. Set the use_discoveryd setting for SendTargets record: #iscsiadm --mode node --target --portal 192.0.2.*:3260 -n discovery.sendtargets.use_discoveryd -v Yes 4. Set the polling interval: #iscsiadm --mode node --target IQN --portal 192.0.2.*:3260 -n discovery.sendtargets.discoveryd_poll_inval -v 30 5. To make the new settings take effect, restart the iscsi service. v In Red Hat Enterprise Linux: # /etc/init.d/iscsi restart v In SUSE Linux Enterprise Server: # rcopen-iscsi restart Now SCSI devices appear automatically after subsequent reboots.

Avoiding data corruption or loss Perform the steps in this procedure to avoid losing or corrupting data. Procedure 1. Stop the I/O operation to the mounted iSCSI device. 2. Unmount the mounted iSCSI device using the umount utility. #umount /dev/sda1

Note: If you try to unmount the iSCSI device while I/O is still running, the unmount command fails with device is busy. 3. Log out from the target: #iscsiadm --mode node --target --portal 192.0.2.* --logout

Note: If you log out from the target while the iSCSI device is mounted and I/O is running, it causes data corruption or loss. So execute step 1 and step 2 of this procedure before you run step 3.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 23 24 Linux on System z: iSCSI Initiator Configuration References v IBM Storwize V7000 Information Center http://pic.dhe.ibm.com/infocenter/storwize/ic/index.jsp

© Copyright IBM Corp. 2013 25 26 Linux on System z: iSCSI Initiator Configuration Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:

IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:

IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

© Copyright IBM Corp. 2013 27 Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact:

IBM Corporation Software Interoperability Coordinator, Department 49XA 3605 Highway 52 N Rochester, MN 55901 U.S.A.

Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.

The licensed program described in this information and all licensed material available for it are provided by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or any equivalent agreement between us.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only.

All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without notice. Dealer prices may vary.

This information is for planning purposes only. The information herein is subject to change before the products described become available.

This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.

COPYRIGHT LICENSE:

This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating

28 Linux on System z: iSCSI Initiator Configuration platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

Each copy or any portion of these sample programs or any derivative work, must include a copyright notice as follows:

© (your company name) (year). Portions of this code are derived from IBM Corp. Sample Programs. © Copyright IBM Corp. _enter the year or years_. All rights reserved.

If you are viewing this information in softcopy, the photographs and color illustrations may not appear.

Trademarks IBM, the IBM logo, ibm.com®, DB2®, DB2 Universal Database™, DS8000®, ECKD™, Express, FICON®, HiperSockets, Rational® Redbooks®, Resource Link®, Service Request Manager®, System Storage, System x®, System z, System z9®, System z10®, Tivoli®, WebSphere®, z/VM, and z9® are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A complete and current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries.

Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other countries, or both and is used under license therefrom.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Centrino, Intel Xeon, Intel SpeedStep, Itanium, Pentium, and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

Other company, product, or service names may be trademarks or service marks of others.

Terms and conditions Permissions for the use of these publications is granted subject to the following terms and conditions.

Personal Use: You may reproduce these publications for your personal, noncommercial use provided that all proprietary notices are preserved. You may

Notices 29 not distribute, display or make derivative works of these publications, or any portion thereof, without the express consent of the manufacturer.

Commercial Use: You may reproduce, distribute and display these publications solely within your enterprise provided that all proprietary notices are preserved. You may not make derivative works of these publications, or reproduce, distribute or display these publications or any portion thereof outside your enterprise, without the express consent of the manufacturer.

Except as expressly granted in this permission, no other permissions, licenses or rights are granted, either express or implied, to the publications or any data, software or other intellectual property contained therein.

The manufacturer reserves the right to withdraw the permissions granted herein whenever, in its discretion, the use of the publications is detrimental to its interest or, as determined by the manufacturer, the above instructions are not being properly followed.

You may not download, export or re-export this information except in full compliance with all applicable laws and regulations, including all United States export laws and regulations.

THE MANUFACTURER MAKES NO GUARANTEE ABOUT THE CONTENT OF THESE PUBLICATIONS. THESE PUBLICATIONS ARE PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.

30 Linux on System z: iSCSI Initiator Configuration Index A iscsid 11, 22 address IPv4 3 Ipv6 3 L Storwise V7000 logging in 13 iSCSI setup 3 logging out 13 loss of data 23 C command discovery 12 M corrupting mapping data 23 iSCSI volumes 8

D N data network interface controller 1 corruption 23 loss 23 discover O targets using YaST 14 open-iscsi 11 discovered targets 13 discovery command 12 R Red Hat Enterprise Linux installing iSCSI 11 H iscsi-initiator-utils 11 host iscsid 11 creating on Storwize V7000 3 references 25

I S initiator software SendTarget method 12 installing 11 Storwize V7000 Internet Small Computer System Interface create iSCSI host 3 See iSCSI mapping iSCSI volumes 8 introduction 1 SUSE Linux Enterprise Server IQN installing iSCSI 11 iscsi-iname 2 open-iscsi 11 specify name 12 isci-iname 2 iSCSI architecture 1 T host 3 target initiator 1 logging in to 14 installing initiator software 11 logging out from 19 setup for Storwize 7000 3 iSCSI initiator default settings 11 Y iSCSI qualified name YaST See IQN discovering targets 14 iSCSI target logging in 14 discovering 12 logging out 19 logging on 13 logging out 13 Storwize V7000 1 iSCSI volume mapping 8 iscsi-initiator-utils 11

© Copyright IBM Corp. 2013 31 32 Linux on System z: iSCSI Initiator Configuration



Printed in USA