Linux on System z: iSCSI Initiator Configuration · viii Linux on System z: iSCSI Initiator...

44
Linux on System z: iSCSI Initiator Configuration

Transcript of Linux on System z: iSCSI Initiator Configuration · viii Linux on System z: iSCSI Initiator...

Linux on System z: iSCSI InitiatorConfiguration

���

Linux on System z: iSCSI InitiatorConfiguration

���

NoteBefore using this information and the product it supports, read the information in “Notices” on page 27.

Contents

Figures . . . . . . . . . . . . . . . v

About this publication . . . . . . . . vii

Chapter 1. Introduction . . . . . . . . 1iSCSI initiators and targets. . . . . . . . . . 1Generating an iSCSI qualified name . . . . . . 2

Chapter 2. Setting up iSCSI at theStorwize V7000 clustered system . . . . 3Creating an iSCSI host on Storwize V7000 . . . . 3Mapping iSCSI volumes to the iSCSI host on theStorwize V7000 system . . . . . . . . . . . 8

Chapter 3. Setting up iSCSI initiatorsoftware on Linux on System z . . . . 11Installing iSCSI initiator software on Linux onSystem z . . . . . . . . . . . . . . . 11Setting the iSCSI qualified name for the Linux host 12

Discovering iSCSI targets using Send Targets . . . 12Logging in to discovered targets . . . . . . . 13Logging out from targets . . . . . . . . . . 13Discovering and logging in to targets using YaST(SUSE-specific) . . . . . . . . . . . . . 13Logging out from iSCSI targets using YaST(SUSE-specific) . . . . . . . . . . . . . 19Automatic iSCSI target discovery and login(persistent across subsequent reboots) . . . . . 22Avoiding data corruption or loss . . . . . . . 23

References . . . . . . . . . . . . . 25

Notices . . . . . . . . . . . . . . 27Trademarks . . . . . . . . . . . . . . 29Terms and conditions . . . . . . . . . . . 29

Index . . . . . . . . . . . . . . . 31

© Copyright IBM Corp. 2013 iii

iv Linux on System z: iSCSI Initiator Configuration

Figures

1. iSCSI architecture . . . . . . . . . . . 12. iSCSI host connection to Storwize V7000 over

Ethernet network . . . . . . . . . . . 23. No iSCSI host on Storwize V7000 . . . . . 44. Create Host window . . . . . . . . . . 45. Entering host name details . . . . . . . . 56. Adding iSCSI ports . . . . . . . . . . 67. Port definitions. . . . . . . . . . . . 78. Create Host window - host is successfully

completed . . . . . . . . . . . . . 89. Overview . . . . . . . . . . . . . 8

10. Listed iSCSI volumes. . . . . . . . . . 911. Mapped volumes . . . . . . . . . . . 9

12. Volume mapped successfully. . . . . . . 1013. List of iSCSI volumes with updated Host

Mappings information . . . . . . . . . 1014. iSCSI Initiator Overview window . . . . . 1415. iSCSI Initiator Discovery window . . . . . 1516. iSCSI Initiator Discovery . . . . . . . . 1617. Select No Authentication . . . . . . . . 1718. Target is connected . . . . . . . . . . 1819. Connected targets . . . . . . . . . . 1920. Connected Targets . . . . . . . . . . 2021. Click Continue to confirm log out. . . . . . 2122. Successful logout. . . . . . . . . . . 22

© Copyright IBM Corp. 2013 v

vi Linux on System z: iSCSI Initiator Configuration

About this publication

This white paper describes the basic configuration of Internet Small ComputerSystems 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 RedHat Enterprise Linux 6.4 results.

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

The following IBM® storage products support iSCSI:v IBM Storwize V7000v IBM XIV® Storage Systemv IBM System Storage® DS5000 Seriesv IBM System Storage DS5020 Express®

v IBM System Storage DCS3700v IBM Storwize V3700v IBM System Storagev DS3500 Express

Linux on System z® supports the following SCSI transports:v Fibre Channel Protocol (FCP), mapping of SCSI over Fibre Channelv 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 ofthis document

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

Author

Deepak P Joshi

Linux on System z

Prerequisitesv Red Hat Enterprise Linux 6 or SUSE Linux Enterprise Server 11 distribution

installed on System z with the network configured. There must be connectivitybetween the Linux system and Storwize V7000. Linux on System z supports thefollowing 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 SwitchEven though the above network connections are supported, the networkconnection must be configured through OSA either in Layer-2 or Layer-3 modefor the iSCSI configuration. In the z/VM® environment the Virtual Switchnetwork connection with rdev option enabled can also be used for the iSCSIconfiguration.HiperSockets™ and GuestLAN network connections cannot be used for the iSCSIconfiguration.For more information about network connections with Linux on System z, seeDevice 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 hostobject) created and mapped with iSCSI LUNs.

v The IP address of the iSCSI portal and IQN of iSCSI target (iSCSI host object) atStorwize V7000

Restrictionsv Storwize V7000 supports only one iSCSI session between an initiator and target

at a timev 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 SystemInterface (iSCSI) standard.

iSCSI is a standard for IP-based (TCP/IP) storage networking, which allows SCSIcommands to be transferred over an IP-based network. It also facilitates theblock-level transfer of SCSI commands over IP (TCP/IP) network. The architectureof iSCSI is similar to that of a client/server architecture, where an initiator acts asthe 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 usedover IP networks.

There are two kinds of iSCSI initiators:v Software-based initiatorv Hardware-based initiator

The software-based initiator is a driver that pairs the network interface driver andthe SCSI block-level driver together to handle the iSCSI requests. Ahardware-based initiator is an iSCSI Host Bus Adapter (HBA), which is similar toNetwork Interface Controller (NIC) with an on-board Application-SpecificIntegrated Circuit (ASIC) to offload iSCSI work from the system CPU. System zuses the software-based iSCSI initiator which in turn means it does not support theoffloading of iSCSI work.

iSCSI initiators and targetsA 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 receivesresponses from iSCSI target. In this case the target is Storwize V7000.

iSCSI targets are the devices, which provide the response to iSCSI commandsreceived from the iSCSI initiators over the IP (TCP/IP) Network. On StorwizeV7000, one or both of its node Ethernet ports are configured to become iSCSItarget.

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

iSCSI initiator iSCSI target

TCP/IP network

Figure 1. iSCSI architecture

© Copyright IBM Corp. 2013 1

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

Generating an iSCSI qualified nameA unique iSCSI qualified name (IQN) can be generated by the utility iscsi-inameand 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-inameiqn.2012-02.com.ibm.de.boeblingen:01:c5f446d488f4

Figure 2. iSCSI host connection to Storwize V7000 over Ethernet network

2 Linux on System z: iSCSI Initiator Configuration

Chapter 2. Setting up iSCSI at the Storwize V7000 clusteredsystem

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

It is assumed that the storage administrator has already set up the Storwize V7000clustered 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 aniSCSI host on Storwize V7000.”

5. Map the volume to the host object in the Storwize V7000 system, see “MappingiSCSI volumes to the iSCSI host on the Storwize V7000 system” on page 8.

Considerationsv 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 notsupported.

v Storwize V7000 Ethernet ports 1 and 2 can each be configured for both a clusterIP address and an iSCSI target IP address.

v A different cluster IP address can be assigned to each system Ethernet port, thusproviding a configuration with redundant Ethernet networks.

v All service and configuration IP addresses associated with a clustered-systemEthernet port must be on the same subnet across all nodes. Each port can residein its own subnet.

v When the host object on the Storwize V7000 system side is created or recreatedfor an iSCSI host, you must log out of any existing sessions from that host andthen log back in.

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

Creating an iSCSI host on Storwize V7000Create a host object on the Storwize V7000 system server that describes the iSCSIserver target to which the volumes are to be mapped.

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

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

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

Figure 3. No iSCSI host on Storwize V7000

Figure 4. Create Host window

4 Linux on System z: iSCSI Initiator Configuration

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

Figure 5. Entering host name details

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 5

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

Figure 6. Adding iSCSI ports

6 Linux on System z: iSCSI Initiator Configuration

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

Figure 7. Port definitions

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 7

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

Mapping iSCSI volumes to the iSCSI host on the Storwize V7000system

Complete this procedure to map iSCSI volumes to the iSCSI host on the StorwizeV7000 system.

Procedure1. 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 anyof the iSCSI hosts, Host mappings shows No against listed iSCSI volumes.

Figure 8. Create Host window - host is successfully completed

Figure 9. Overview

8 Linux on System z: iSCSI Initiator Configuration

2. Right click iSCSI volume, select map to host. The Modify Host Mappingwindow 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 tothe Host panel as shown in Figure 11.

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

Figure 10. Listed iSCSI volumes

Figure 11. Mapped volumes

Chapter 2. Setting up iSCSI at the Storwize V7000 clustered system 9

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

Figure 12. Volume mapped successfully

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 onSystem 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 iSCSItargets

Installing iSCSI initiator software on Linux on System zThis section describes how to install the iSCSI initiator software on Linux onSystem z.

Before you begin

Ensure that you have the latest release of the initiator software from the Linuxdistribution vendor which supports the Storwize V7000 system (iSCSI target).

About this task

The initiator software on Red Hat Enterprise Linux systems is packaged asiscsi-initiator-utils. The initiator software on SUSE Linux Enterprise Serversystems is packaged as open-iscsi.

Procedure1. For Red Hat Enterprise Linux (RHEL 6)

# rpm -qa |grep iscsi-initiator-utilsiscsi-initiator-utils-6.2.0.873-2.el6.s390x

If the package is not installed:#rpm -ivh <iscsi-initiator-utils rpm package>

or#yum install iscsi-initiator-utils

For SUSE Linux Enterprise Server (SLES 11)# rpm -qa | grep open-iscsiopen-iscsi-2.0.872-0.35.1

If the package is not installed:#rpm -ivh <open-iscsi rpm package>

or#zypper install open-iscsi

2. To manage the software, use the chkconfig and service commands. The servicefor Red Hat Enterprise Linux systems is iscsid. The service for SUSE LinuxEnterprise Server is open-iscsi. The following examples are for Red HatEnterprise Linux and SUSE Linux Enterprise Server.For Red Hat Enterprise Linux (RHEL 6)# chkconfig | grep iscsidiscsid 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 startStarting iscsi: [ OK ]

For SUSE Linux Enterprise Server (SLES 11)# chkconfig --list |grep iscsiopen-iscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# insserv open-iscsi

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

# /etc/init.d/open-iscsi startLoading iscsi modules: tcp doneStarting iSCSI initiator service: doneSetting up iSCSI targets: unused

or#rcopen-iscsi startLoading iscsi modules: tcp doneStarting iSCSI initiator service: doneSetting 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 hostThis section describes how to specify the iSCSI qualified name (IQN) for the Linuxhost.

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

Edit the /etc/iscsi/initiatorname.iscsi file to specify the IQN name. Thefollowing 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-initiatorservice.

Discovering iSCSI targets using Send TargetsThis section describes how to discover iSCSI target portals using the SendTargetsmethod.

This command returns the iSCSI qualified name (IQN) and target portalsassociated 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 V7000clustered 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 targetsThis section describes how to connect to a specific portal on a discovered target.

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

On the Linux host, use the following command to log on to the Storwize V7000system target:iscsiadm --mode node --target <IQN> --portal 192.0.2.* --login

# iscsiadm --mode node --target iqn.2012-02.com.ibm.de.boeblingen:2145.v7k01.node1--portal 192.0.2.* --loginLogging 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 V7000system 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 targetsThis section describes how to log out from a specific target or from all establishedsessions.

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

To log out from a specific Storwize V7000 system target, run the followingcommand:iscsiadm --mode node --target <IQN> --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 --portal192.0.2.* --logoutLogging 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=allLogging 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

Procedure1. As a root user, launch YaST2. 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.

.

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.

Figure 14. iSCSI Initiator Overview window

14 Linux on System z: iSCSI Initiator Configuration

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

Figure 15. iSCSI Initiator Discovery window

Chapter 3. Setting up iSCSI initiator software on Linux on System z 15

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

Figure 16. iSCSI Initiator Discovery

16 Linux on System z: iSCSI Initiator Configuration

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

Figure 17. Select No Authentication

Chapter 3. Setting up iSCSI initiator software on Linux on System z 17

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

Figure 18. Target is connected

18 Linux on System z: iSCSI Initiator Configuration

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.

Procedure1. As root user launch YaST.2. Select Network Services > SCSI Initiator.3. Go to Connected Targets as shown in Figure 20 on page 20.

Figure 19. Connected targets

Chapter 3. Setting up iSCSI initiator software on Linux on System z 19

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

Figure 20. Connected Targets

20 Linux on System z: iSCSI Initiator Configuration

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

Figure 21. Click Continue to confirm log out.

Chapter 3. Setting up iSCSI initiator software on Linux on System z 21

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

Automatic iSCSI target discovery and login (persistent acrosssubsequent reboots)

You can configure iscsid to discover the iSCSI target and to log in to the iSCSItarget automatically.

About this task

When iscsid starts, it checks the SendTarget discovery records. The steps are asfollows:

Procedure1. 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:

Figure 22. Successful logout

22 Linux on System z: iSCSI Initiator Configuration

v automatic in Red Hat Enterprise Linuxv manual in SUSE Linux Enterprise Server

2. Create the SendTargets record:# iscsiadm --mode node --target <IQN> --portal 192.0.2.*:3260 -o new

3. Set the use_discoveryd setting for SendTargets record:#iscsiadm --mode node --target <IQN> --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 lossPerform the steps in this procedure to avoid losing or corrupting data.

Procedure1. 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, theunmount command fails with device is busy.

3. Log out from the target:#iscsiadm --mode node --target <IQN> --portal 192.0.2.* --logout

Note: If you log out from the target while the iSCSI device is mounted andI/O is running, it causes data corruption or loss. So execute step 1 and step 2of 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

Referencesv 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 inother countries. Consult your local IBM representative for information on theproducts and services currently available in your area. Any reference to an IBMproduct, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product,program, or service that does not infringe any IBM intellectual property right maybe used instead. However, it is the user's responsibility to evaluate and verify theoperation of any non-IBM product, program, or service.

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

IBM Director of LicensingIBM CorporationNorth Castle DriveArmonk, NY 10504-1785U.S.A.

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

IBM World Trade Asia CorporationLicensing 2-31 Roppongi 3-chome, Minato-kuTokyo 106-0032, Japan

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

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

Any references in this information to non-IBM Web sites are provided forconvenience only and do not in any manner serve as an endorsement of those Websites. The materials at those Web sites are not part of the materials for this IBMproduct 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 itbelieves 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 purposeof enabling: (i) the exchange of information between independently createdprograms and other programs (including this one) and (ii) the mutual use of theinformation which has been exchanged, should contact:

IBM CorporationSoftware Interoperability Coordinator, Department 49XA3605 Highway 52 NRochester, MN 55901U.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 materialavailable for it are provided by IBM under terms of the IBM Customer Agreement,IBM International Program License Agreement, or any equivalent agreementbetween us.

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

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

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

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

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

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

COPYRIGHT LICENSE:

This information contains sample application programs in source language, whichillustrate programming techniques on various operating platforms. You may copy,modify, and distribute these sample programs in any form without payment toIBM, for the purposes of developing, using, marketing or distributing applicationprograms 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 notbeen thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs.

Each copy or any portion of these sample programs or any derivative work, mustinclude 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 rightsreserved.

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

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

Adobe, the Adobe logo, PostScript, and the PostScript logo are either registeredtrademarks 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 theUnited 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 aretrademarks or registered trademarks of Intel Corporation or its subsidiaries in theUnited States and other countries.

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

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

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

Terms and conditionsPermissions for the use of these publications is granted subject to the followingterms 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 anyportion thereof, without the express consent of the manufacturer.

Commercial Use: You may reproduce, distribute and display these publicationssolely within your enterprise provided that all proprietary notices are preserved.You may not make derivative works of these publications, or reproduce, distributeor 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 orrights 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 hereinwhenever, in its discretion, the use of the publications is detrimental to its interestor, as determined by the manufacturer, the above instructions are not beingproperly followed.

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

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

30 Linux on System z: iSCSI Initiator Configuration

Index

Aaddress

IPv4 3Ipv6 3Storwise V7000

iSCSI setup 3

Ccommand

discovery 12corrupting

data 23

Ddata

corruption 23loss 23

discovertargets using YaST 14

discovered targets 13discovery

command 12

Hhost

creating on Storwize V7000 3

Iinitiator software

installing 11Internet Small Computer System Interface

See iSCSIintroduction 1IQN

iscsi-iname 2specify name 12

isci-iname 2iSCSI

architecture 1host 3initiator 1installing initiator software 11setup for Storwize 7000 3

iSCSI initiatordefault settings 11

iSCSI qualified nameSee IQN

iSCSI targetdiscovering 12logging on 13logging out 13Storwize V7000 1

iSCSI volumemapping 8

iscsi-initiator-utils 11

iscsid 11, 22

Llogging in 13logging out 13loss

of data 23

Mmapping

iSCSI volumes 8

Nnetwork interface controller 1

Oopen-iscsi 11

RRed Hat Enterprise Linux

installing iSCSI 11iscsi-initiator-utils 11iscsid 11

references 25

SSendTarget method 12Storwize V7000

create iSCSI host 3mapping iSCSI volumes 8

SUSE Linux Enterprise Serverinstalling iSCSI 11open-iscsi 11

Ttarget

logging in to 14logging out from 19

YYaST

discovering targets 14logging in 14logging out 19

© Copyright IBM Corp. 2013 31

32 Linux on System z: iSCSI Initiator Configuration

����

Printed in USA