diff --git a/DC-SLES-ISCSI b/DC-SLES-ISCSI new file mode 100644 index 000000000..d78b776d8 --- /dev/null +++ b/DC-SLES-ISCSI @@ -0,0 +1,19 @@ +# This file originates from the project https://github.com/openSUSE/doc-kit +# This file can be edited downstream. + +## Basics +MAIN="iscsi.asm.xml" +SRC_DIR="articles" +IMG_SRC_DIR="images" + +## Profiling +PROFOS="sles" +PROFCONDITION="16.0" +#STRUCTID="sles-iscsi" +#PROFARCH="x86_64;zseries;power;aarch64" + +DOCBOOK5_RNG_URI="urn:x-suse:rng:v2:geekodoc-flat" + +## stylesheet location +STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns" +FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2021-ns" \ No newline at end of file diff --git a/articles/iscsi.asm.xml b/articles/iscsi.asm.xml new file mode 100644 index 000000000..93ec37357 --- /dev/null +++ b/articles/iscsi.asm.xml @@ -0,0 +1,150 @@ + + + + %entities; +]> + + + + + + + + + + + + + + + + + + Understanding iSCSI + + 2026-02-11 + + + Initial version + + + + + + + + + + Smart Docs + + + + Administration + Configuration + Security + + + + + + https://bugzilla.suse.com/enter_bug.cgi + Documentation + SUSE Linux Enterprise Server 16.0 + amrita.sakthivel@suse.com + + yes + + + + + &x86-64; + &power; + &zseries; + &aarch64; + + + + + &productname; + + + + Introduction to iSCSI + Understanding iSCSI allows you to treat remote network storage as a locally attached hard drive, giving you the power to run high-performance applications like databases and virtual machines + + + Use iSCSI to manage your storage + + + + + WHAT? + + + iSCSI is a networking standard that allows a system to treat a remote storage device over an Ethernet network as if it were a physically plugged-in local hard drive. + + + + + WHY? + + + Learn how to use iSCSI is used to provide a cost-effective way to consolidate storage into a central location while allowing remote servers to access that data with the high performance and formatting flexibility of a locally attached hard drive. + + + + + EFFORT + + +The average reading time of this article is approximately 40 minutes. + + + + + REQUIREMENTS + + + + +Linux fundamentals: Understanding basic Linux commands, file permissions, directory structures +and use of the command line. + + + + +Networking fundamentals: Understanding how IP addresses and subnets work, as iSCSI relies on your local network to find the storage. It also helps to know that iSCSI uses TCP Port 3260 to communicate. + + + + +Storage fundamentals: Understanding the difference between file level storage (like a folder on Google Drive) and block level storage (like a raw, unformatted hard drive), as iSCSI is strictly block-level. + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/concepts/intro-iscsi.xml b/concepts/intro-iscsi.xml new file mode 100644 index 000000000..2d9e863bc --- /dev/null +++ b/concepts/intro-iscsi.xml @@ -0,0 +1,68 @@ + + + %entities; +]> + + + + + + + About iSCSI + + + + iSCSI (Internet Small Computer Systems Interface) is a networking protocol that enables the transmission of SCSI commands over IP networks, allowing a system to access remote storage as if it were a locally attached hard drive. + + + + + By wrapping storage-level data blocks into standard TCP/IP packets, it bridges the gap between local storage performance and network flexibility, using existing Ethernet infrastructure like switches and cables rather than expensive, specialized hardware. In an iSCSI setup, the initiator connects to a target to claim a portion of disk space known as a LUN (Logical Unit Number), which the client can then format and manage with its own native file system. + Note that LU (Logical Unit) is the data container or virtual disk and LUN (Logical Unit NUmber) is the numerical address of the container. + Linux iSCSI provides iSCSI initiator and iSCSI LIO (Linux-IO) target software for connecting Linux servers to central storage systems. + + In a physical iSCSI environment, the initiator is the server’s software that requests data, the LIO target is the physical storage appliance that hosts the data and the LUN (Logical Unit Number) represents the specific physical disk capacity assigned to the server. + + The iSCSI Initiator:The initiator is the physical server that needs to consume the storage. It initiates the conversation with the target. + + HBA (Host Bus Adapter): While you can use a standard network card, a physical iSCSI HBA is a dedicated expansion card installed in the server's PCIe slot. It contains its own processor to handle storage traffic and prevents the server’s main CPU from becoming overwhelmed. + Physical Ports: These are the dedicated connection points on the server used exclusively for storage traffic to ensure low latency and high throughput. + + + The iSCSI LIO Target:The target is the physical hardware device that houses the data. LIO (Linux-IO) is the standard, open-source storage enterprise-grade target for the Linux kernel. + + The LUN: While a LUN is a logical identifier, it directly corresponds to the physical disk resources allocated to a server. + + Physical Disk Groups: A LUN is often a physical collection of disks bound together in a RAID configuration. + The Drive to the OS: From the server's perspective, the LUN is treated as a physical local hard drive. You can format, partition and install files on it just like a drive plugged directly into the motherboard. + Physical Capacity: The size of the LUN is limited by the number of physical disks installed in the target array. + + + +
+ Key characteristics of remote iSCSI storage + Following are some the common characteristics of iSCSI: + + Block-Level Access: Unlike a network share where you see files, with iSCSI, your system sees raw sectors. This allows you to format the remote drive with any file system such as NTFS, ReFS, or ext4. + Distance and Flexibility: The storage can be in a server rack across the room or in a data center across the city. As long as there is a network connection, the system treats it as local storage. + Low Latency Requirement: Because the OS thinks the drive is local, it expects fast responses. This is why remote iSCSI usually requires a high-speed network ( preferably 10Gbps or higher). + +
+
+ Use cases for remote iSCSI storage + The common use cases for iSCSI include: + + Virtualization: Servers running VMware or Hyper-V store virtual machines on remote iSCSI targets so that if one physical server dies, another can immediately take over the disk over the network. + Database Hosting: High-performance databases like SQL Server or Oracle require block-level access to manage data placement and logging. Since iSCSI presents itself as a local physical disk rather than a shared folder, it satisfies the strict technical requirements of database software while keeping the data on a secure and centralized server. + Consolidated Backup and Disaster Recovery: iSCSI allows organizations to centralize backups from various machines onto one large and manageable storage array. It also supports diskless booting, where a server with no internal hard drive can load its entire operating system directly from a remote iSCSI target, making hardware replacement much faster. + +
+
\ No newline at end of file diff --git a/concepts/targetcli-iscsiadm-iscsi.xml b/concepts/targetcli-iscsiadm-iscsi.xml new file mode 100644 index 000000000..329e9ab96 --- /dev/null +++ b/concepts/targetcli-iscsiadm-iscsi.xml @@ -0,0 +1,237 @@ + + + %entities; +]> + + + + + + + Understanding <command>targetcli</command> and <command>iscsiadm</command> command-line utilities + + + + +To understand the ecosystem of Linux storage networking, it is essential to distinguish between the two pillars of the iSCSI framework; targetcli and iscsiadm command-line utilities. + + + + +While they both facilitate the transmission of SCSI commands over IP networks, they operate on opposite ends of the connection. targetcli is the administration tool for the Linux-IO (LIO) target subsystem, used on the server-side to define, export, and manage the physical or virtual storage volumes that will be shared. +In contrast, iscsiadm is the primary utility for the Open-iSCSI project, functioning on the client-side (the initiator) to discover, log into, and manage the remote disks provided by the target. + +
+The <command>targetcli</command> command-line utility + The targetcli tool is the primary command-line administration tool used to configure and manage the LIO (Linux-IO) target subsystem, which is the standard open-source storage target for the Linux kernel. + It operates as an interactive shell with a hierarchical file-system-like structure and allows system administrators to export local storage resources—such as physical disks, files, or LVM (Logical Volumes) to remote clients via various fabrics, most notably iSCSI. + It provides a unified interface to define back stores, creates IQNs (iSCSI Qualified Names), and establishes ACLs (Access Control Lists). + Similar to a conventional shell, you can traverse the targetcli functional hierarchy using the cd command and + list contents with the ls command. While each directory has its own set of commands, these commands that are available in + all directories. You can use the help command in any directory to view a + list of available commands or information about any command in particular. + + The targetcli tool is part of the + targetcli-fb package. This package is available in the + official &productname; software repository, and it can be installed using + the following command: + + + &prompt.sudo;zypper install targetcli-fb + + To switch to the targetcli shell, run the targetcli as + root: + + +&prompt.sudo;targetcli + + You can then run the ls command to see the default + configuration. + + +/> ls +o- / ............................ [...] + o- backstores ................. [...] + | o- block ..... [Storage Objects: 0] + | o- fileio .... [Storage Objects: 0] + | o- pscsi ..... [Storage Objects: 0] + | o- ramdisk ... [Storage Objects: 0] + | o- rbd ....... [Storage Objects: 0] + o- iscsi ............... [Targets: 0] + o- loopback ............ [Targets: 0] + o- vhost ............... [Targets: 0] + o- xen-pvscsi .......... [Targets: 0] +/> + + targetcli supports the following back-ends: + + + + + + fileio, local image file + + + + + block, block storage on a dedicated disk or partition + + + + + pscsi, SCSI pass-through devices + + + + + ramdisk, memory-based back-end + + + + + rbd, Ceph RADOS block devices + + + + + Set up a local image file as a software target + /backstores/fileio create test-disc /alt/test.img 1G + + + This creates a 1 GB test.img image in the + specified location (in this case /alt). Run + ls, and you should see the following result: + + +/> ls +o- / ........................................................... [...] + o- backstores ................................................ [...] + | o- block .................................... [Storage Objects: 0] + | o- fileio ................................... [Storage Objects: 1] + | | o- test-disc ... [/alt/test.img (1.0GiB) write-back deactivated] + | | o- alua ...... .......................... [ALUA Groups: 1] + | | o- default_tg_pt_gp .... [ALUA state: Active/optimized] + | o- pscsi .................................... [Storage Objects: 0] + | o- ramdisk .................................. [Storage Objects: 0] + | o- rbd ...................................... [Storage Objects: 0] + o- iscsi .............................................. [Targets: 0] + o- loopback ........................................... [Targets: 0] + o- vhost .............................................. [Targets: 0] + o- xen-pvscsi ......................................... [Targets: 0] +/> + +
+
+ The <command>iscsiadm</command> command-line utility + The iscsiadm tool is used in Linux environments to manage and administer the Open-iSCSI implementation, acting as the primary interface for configuring and managing iSCSI connections. + It allows administrators to discover targets on a network, log in or out of specific storage portals, and manage a local database of persistent iSCSI nodes. + By communicating with the iscsid daemon, it facilitates the mapping of remote block storage devices over an IP network, making remote disks appear as local SCSI devices, such as /dev/sdb to the operating system. + + Both the discovery and the configuration of iSCSI connections require a + running iscsid. When running the discovery the first time, the internal + database of the iSCSI initiator is created in the directory + /etc/iscsi/. + + + If your discovery is password protected, provide the authentication + information to iscsid. Because the internal database does not exist when + doing the first discovery, it cannot be used now. Instead, the + configuration file /etc/iscsid.conf must be edited to + provide the information. To add your password information for the + discovery, add the following lines to the end of + /etc/iscsid.conf: + +discovery.sendtargets.auth.authmethod = CHAP +discovery.sendtargets.auth.username = USERNAME +discovery.sendtargets.auth.password = PASSWORD + + The discovery stores all received values in an internal persistent + database. In addition, it displays all detected targets. Run this discovery + with the following command: +&prompt.sudo;iscsiadm +10.44.171.99:3260,1 iqn.2006-02.com.example.iserv:systems + + To discover the available targets on an iSNS server: + +sudo iscsiadm --mode discovery --type isns --portal TARGET_IP +For each target defined on the iSCSI target, one line appears. + + The special option of iscsiadm + creates all needed devices: + +&prompt.sudo;iscsiadm -m node -n iqn.2006-02.com.example.iserv:systems --login + +The newly generated devices show up in the output of lsscsi and can now be mounted. + + All information discovered by the iSCSI initiator is stored in two + database files that reside in /etc/iscsi. There is one + database for the discovery of targets and one for the discovered nodes. + When accessing a database, you first must select if you want to get your + data from the discovery or from the node database. Do this with the + and parameters of + iscsiadm. Using iscsiadm with one of + these parameters gives an overview of the stored records: + +&prompt.sudo;iscsiadm -m discovery 10.44.171.99:3260,1 iqn.2006-02.com.example.iserv:systems + + + The target name in this example is + iqn.2006-02.com.example.iserv:systems. This name is + needed for all actions that relate to this special data set. To examine the + content of the data record with the ID + iqn.2006-02.com.example.iserv:systems, use the following + command: + +&prompt.sudo;iscsiadm -m node --targetname iqn.2006-02.com.example.iserv:systems +node.name = iqn.2006-02.com.example.iserv:systems +node.transport_name = tcp +node.tpgt = 1 +node.active_conn = 1 +node.startup = manual +node.session.initial_cmdsn = 0 +node.session.reopen_max = 32 +node.session.auth.authmethod = CHAP +node.session.auth.username = joe +node.session.auth.password = ******** +node.session.auth.username_in = EMPTY +node.session.auth.password_in = EMPTY +node.session.timeo.replacement_timeout = 0 +node.session.err_timeo.abort_timeout = 10 +node.session.err_timeo.reset_timeout = 30 +node.session.iscsi.InitialR2T = No +node.session.iscsi.ImmediateData = Yes +.... + + To edit the value of one of these variables, use the command + iscsiadm with the operation. For + example, if you want iscsid to log in to the iSCSI target when it + initializes, set the variable to the value + : + +sudo iscsiadm -m node -n iqn.2006-02.com.example.iserv:systems \ +-p ip:port --op=update --name=node.startup --value=automatic + + Remove obsolete data sets with the delete command, for example: + +&prompt.sudo;iscsiadm -m node -n iqn.2006-02.com.example.iserv:systems \ +-p ip:port --op=delete + + To get a list of all discovered targets, run the sudo iscsiadm -m + node command. + + + No confirmation + + Use this option with caution because it deletes the record without any + additional confirmation prompt. + + +
+
\ No newline at end of file diff --git a/glues/info-iscsi.xml b/glues/info-iscsi.xml new file mode 100644 index 000000000..2e8046982 --- /dev/null +++ b/glues/info-iscsi.xml @@ -0,0 +1,41 @@ + + + %entities; +]> + + + For more information + + + + + + + The Open-iSCSI project home page at . + + + + + The man pages for iscsiadm, iscsid, and the example configuration file + /etc/iscsid.conf. + + + + + The man page for atrgetcli. + + + + + + + \ No newline at end of file diff --git a/references/iscsi-terminology.xml b/references/iscsi-terminology.xml new file mode 100644 index 000000000..7b377f9ee --- /dev/null +++ b/references/iscsi-terminology.xml @@ -0,0 +1,272 @@ + + + + + %entities; +]> + + + iSCSI terminology + + + + The following lists essential terminology for the iSCSI LIO target server and the initiator client. + + + + + + ACL (Access Control List) + + + A security list on the Target that specifies which Initiator IQNs are allowed to connect. + + + + backstore + + + A physical storage object that provides the actual storage underlying an + iSCSI endpoint. In LIO: + + + iblocks:A raw block device like /dev/sdb . + fileio:A file on a regular filesystem used as a virtual disk. + pscsi:Direct pass-through to a physical SCSI device. + + + + + CDB (command descriptor block) + + + A CDB is the fundamental data structure used by the SCSI protocol to tell a storage device what to do. Since iSCSI is SCSI over IP, the iSCSI initiator wraps these CDBs inside TCP/IP packets to send them to the LIO Target. +CDBs are commonly 6, 10, or 12 bytes long, though they can be 16 bytes or of variable length. + + + + + CHAP (challenge handshake authentication protocol) + + + A point-to-point protocol (PPP) authentication method used to confirm the + identity of one computer to another. After the Link Control Protocol + (LCP) connects the two computers, and the CHAP method is negotiated, the + authenticator sends a random Challenge to the peer. The peer issues a + cryptographically hashed Response that depends upon the Challenge and a + secret key. The authenticator verifies the hashed Response against its + own calculation of the expected hash value, and either acknowledges the + authentication or terminates the connection. CHAP is defined in the RFC + 1994. + + + + + CID (connection identifier) + + + A 16‐bit number, generated by the initiator, that uniquely identifies a + connection between two iSCSI devices. This number is presented during the + login phase. + + + + + Discovery + + + The process where the Initiator queries a target portal to see what IQNs are available to it. + + + + endpoint + + + The combination of an iSCSI Target Name with an iSCSI TPG (IQN + Tag). + + + + + EUI (extended unique identifier) + + + A 64‐bit number that uniquely identifies every device in the world. The + format consists of 24 bits that are unique to a given company, and 40 + bits assigned by the company to each device it builds. + + + + + initiator + + + The originating end of an SCSI session. Typically a controlling device + such as a computer. + + + + + IPS (Internet protocol storage) + + + The class of protocols or devices that use the IP protocol to move data + in a storage network. FCIP (Fibre Channel over Internet Protocol), iFCP + (Internet Fibre Channel Protocol), and iSCSI (Internet SCSI) are all + examples of IPS protocols. + + + + + IQN (iSCSI qualified name) + + + A name format for iSCSI that uniquely identifies every device in the + world (for example: + iqn.5886.com.acme.tapedrive.sn‐a12345678). + + + + + ISID (initiator session identifier) + + + A 48‐bit number, generated by the initiator, that uniquely identifies a + session between the initiator and the target. This value is created + during the login process, and is sent to the target with a Login PDU. + + + + + Initiatorname + + + The unique IQN assigned to the client. This must be registered in the Target's ACL for a connection to be successful. + + + + + MCS (multiple connections per session) + + + A part of the iSCSI specification that allows multiple TCP/IP connections + between an initiator and a target. + + + + + Login + + + The process of authenticating and establishing a session between the initiator and the target. + + + + + MPIO (multipath I/O) + + + A method by which data can take multiple redundant paths between a server + and storage. + + + + + network portal + + + The combination of an iSCSI endpoint with an IP address plus a TCP + (Transmission Control Protocol) port. TCP port 3260 is the port number + for the iSCSI protocol, as defined by IANA (Internet Assigned Numbers + Authority). + + + + + Node + + + In the context of initiator software like iscsiadm, a node represents a specific target that has been discovered and recorded in the local database. + + + + SAM (SCSI architectural model) + + + A document that describes the behavior of SCSI in general terms, allowing + for different types of devices communicating over various media. + + + + + Session + + + The active TCP connection or group of connections between an initiator and a target. + + + + + target + + + The receiving end of an SCSI session, typically a device such as a disk + drive, tape drive, or scanner. + + + + + targetcli + + + The shell-like interface used to configure LIO on Linux. + + + + + target group (TG) + + + A list of SCSI target ports that are all treated the same when creating + views. Creating a view can help simplify LUN (logical unit number) + mapping. Each view entry specifies a target group, host group, and a LUN. + + + + + target port + + + The combination of an iSCSI endpoint with one or more LUNs. + + + + + target port group (TPG) + + + A list of IP addresses and TCP port numbers that determines which + interfaces a specific iSCSI target will listen to. + + + + + target session identifier (TSID) + + + A 16‐bit number, generated by the target, that uniquely identifies a + session between the initiator and the target. This value is created + during the login process, and is sent to the initiator with a Login + Response PDU (protocol data units). + + + + + \ No newline at end of file diff --git a/tasks/install-configure-iscsi-initiator.xml b/tasks/install-configure-iscsi-initiator.xml new file mode 100644 index 000000000..a4b3651a7 --- /dev/null +++ b/tasks/install-configure-iscsi-initiator.xml @@ -0,0 +1,42 @@ + + + %entities; +]> + + + + + + + Installing and configuring an iSCSI initiator + + + +An iSCSI Initiator is the client component in a SAN that initiates communication by sending SCSI commands over an IP network to a remote storage target. Once connected, it makes the remote network storage appear to the local operating system as a physically attached, raw block device. + + + + + Installing and configuring an iSCSI initiator + Install the iSCSI Initiator: + &prompt.sudo; zypper install install open-iscsi + + Configure the Initiator name. The name must match the ACL created on the Target. + Open the configuration file: +vi /etc/iscsi/initiatorname.iscsi +Edit the line to match: +InitiatorName=iqn.2026-04.com.example:sles.initiator +Restart the service: +&prompt.sudo; systemctl restart iscsid + + + + \ No newline at end of file diff --git a/tasks/install-configure-iscsi-target.xml b/tasks/install-configure-iscsi-target.xml new file mode 100644 index 000000000..0bbdaa399 --- /dev/null +++ b/tasks/install-configure-iscsi-target.xml @@ -0,0 +1,57 @@ + + + %entities; +]> + + + + + + + Installing and configuring an iSCSI ISO target server + + + + The iSCSI LIO Target is an open-source, kernel-level software framework in Linux that transforms a standard server into a high-performance storage controller by exporting local storage over a network. It acts as the server side of an iSCSI SAN (Storage Area Network), managing the communication between physical backstores and remote clients to provide seamless, block-level data access. + An iSCSI SAN is a specialized high-speed network that provides block-level network access to storage. + + + + +To install and configure the iSCSI LIO Target server, follow the steps in the procedure: + + +Installing and configuring an iSCSI LIO Target server +Install and enable the Linux SCSI target framework: +&prompt.sudo; zypper install targetcli-fb +&prompt.sudo; systemctl enable --now target + +Prepare the storage.You should have an unpartitioned disk or a logical volume ready, for example at /dev/vdb. + + + Configure the Target using targetcli: + &prompt.sudo; targetcli + Create a backstore: + /& backstores/block create test_storage dev=/dev/vdb + Create an IQN (iSCSI Qualified Name): + /& iscsi/ create iqn.2026-04.com.example:sles.target + Create a LUN (Logical Unit Number): + /& iscsi/iqn.2026-04.com.example:sles.target/tpg1/luns create /backstores/block/test_storage + +Set ACL (Set Access Control): + /& iscsi/iqn.2026-04.com.example:sles.target/tpg1/acls create iqn.2026-04.com.example:sles.initiator + +Save and exit: + /& saveconfig + /& exit + + + \ No newline at end of file diff --git a/tasks/troubleshooting-iscsi.xml b/tasks/troubleshooting-iscsi.xml new file mode 100644 index 000000000..65e36275e --- /dev/null +++ b/tasks/troubleshooting-iscsi.xml @@ -0,0 +1,107 @@ + + + %entities; +]> + + + + + + + Troubleshooting iSCSI + + + +Effectively troubleshooting an iSCSI environment begins with recognizing that most disruptions stem from a handful of common known issues, ranging from basic network reachability and firewall blockages on port 3260 to more nuanced configuration errors like IQN mismatches, incorrect CHAP authentication credentials, and MTU inconsistencies that trigger intermittent packet loss. + + + + +The following are some known issues and possible solutions for iSCSI target and iSCSI initiator: + + + +Portal error when setting up target LUNs on an iSCSI LIO target server + + + When adding or editing an iSCSI LIO target group, you get an error: + +Problem setting network portal IP_ADDRESS:3260 + + The /var/log/YasT2/y2log log file contains the + following error: + +find: `/sys/kernel/config/target/iscsi': No such file or directory + + This problem occurs if the iSCSI LIO Target Server software is not + currently running. To resolve this issue, exit &yast;, manually start iSCSI + LIO at the command line with systemctl start targetcli, + then try again. + + + You can also enter the following to check if configfs, + iscsi_target_mod, and target_core_mod + are loaded. A sample response is shown. + +&prompt.sudo;lsmod | grep iscsi +iscsi_target_mod 295015 0 +target_core_mod 346745 4 +iscsi_target_mod,target_core_pscsi,target_core_iblock,target_core_file +configfs 35817 3 iscsi_target_mod,target_core_mod +scsi_mod 231620 16 +iscsi_target_mod,target_core_pscsi,target_core_mod,sg,sr_mod,mptctl,sd_mod, +scsi_dh_rdac,scsi_dh_emc,scsi_dh_alua,scsi_dh_hp_sw,scsi_dh,libata,mptspi, +mptscsih,scsi_transport_spi + + +iSCSI LIO targets are not visible from other systems + If you use a firewall on the target server, you must open the iSCSI port + that you are using to allow other systems to see the iSCSI LIO targets. + TCP port 3260 is the port number for the iSCSI protocol, as defined by IANA (Internet Assigned Numbers Authority). + + Data packets dropped for iSCSI traffic + A firewall might drop packets if it gets too busy. The default for the SUSE + Firewall is to drop packets after three minutes. If you find that iSCSI + traffic packets are being dropped, consider configuring the SUSE Firewall + to queue packets instead of dropping them when it gets too busy. + + Using iSCSI volumes with LVM + Use the troubleshooting tips in this section when using LVM on iSCSI + targets. + Check if the iSCSI initiator discovery occurs at boot + When you set up the iSCSI Initiator, ensure that you enable discovery at + boot time so that udev can discover the iSCSI devices at boot time and set + up the devices to be used by LVM. + Check that iSCSI target discovery occurs at boot + Remember that udev provides the default setup for + devices. Ensure that all of the applications that create devices are + started at boot time so that udev can recognize and + assign devices for them at system start-up. If the application or service + is not started until later, udev does not create the + device automatically as it would at boot time. + iSCSI targets are mounted when the configuration file is set to manual + When Open-iSCSI starts, it can mount the targets even if the + node.startup option is set to manual in the + /etc/iscsi/iscsid.conf file if you manually modified + the configuration file. + + + Check the + /etc/iscsi/nodes/TARGET_NAME/IP_ADDRESS,PORT/default + file. It contains a node.startup setting that overrides + the /etc/iscsi/iscsid.conf file. Setting the mount + option to manual by using the &yast; interface also sets + node.startup = manual in the + /etc/iscsi/nodes/TARGET_NAME/IP_ADDRESS,PORT/default + files. + + + \ No newline at end of file diff --git a/tasks/workflow-iscsi.xml b/tasks/workflow-iscsi.xml new file mode 100644 index 000000000..5c35e8b75 --- /dev/null +++ b/tasks/workflow-iscsi.xml @@ -0,0 +1,110 @@ + + + %entities; +]> + + + + + + + Establishing and validating an iSCSI session between the iSCSI LIO target server and initiator + + + + The following procedure assumes that both the iSCSI LIO target server and initiator are installed and configured. +Additionally, as an example the iSCSI LIO target server has a IP 192.168.122.200 and the iSCSI initiator 192.168.122.181. + + + +Before attempting a connection, ensure the target is actively listening on the network: +&prompt.user; ss -nltp | grep 3260 +LISTEN 0 256 *:3260 *:* +You must see 0.0.0.0:3260 or your specific target IP. + +Enter the targetcli shell and verify the initiator's IQN is listed under the ACLs for your specific TPG (Target Portal Group): + +&prompt.sudo; targetcli + targetcli shell version 3.0.1 + Copyright 2011-2013 by Datera, Inc and others. + For help on commands, type 'help'. + + /> ls /iscsi + o- iscsi ........................................................[Targets: 1] + o- iqn.2026-04.com.example:sles.target ...........................[TPGs: 1] + o- tpg1 ...........................................[no-gen-acls, no-auth] + o- acls ......................................................[ACLs: 1] + | o- iqn.2026-04.com.example:sles.initiator ...........[Mapped LUNs: 1] + | o- mapped_lun0 ......................[lun0 block/test_storage (rw)] + o- luns ......................................................[LUNs: 1] + | o- lun0 ...........[block/test_storage (/dev/vdb) (default_tg_pt_gp)] + o- portals ................................................[Portals: 1] + o- [::0]:3260 ...................................................[OK] + /> + + + The initiator must connect with the target to pull the available records into its local database: +&prompt.sudo; iscsiadm -m discovery -t sendtargets -p 192.168.122.200 +192.168.122.200:3260,1 iqn.2026-04.com.example:sles.target + + +Check that a file named after the target IQN now exists in /var/lib/iscsi/nodes/: +&prompt.sudo; ls + iqn.2026-04.com.example:sles.target + +Establish an active data session and map the remote storage as a local device: +&prompt.sudo; iscsiadm -m node -T iqn.2026-04.com.example:sles.target -p 192.168.122.200 --login +Login to [iface: default, target: iqn.2026-04.com.example:sles.target, portal: 192.168.122.200,3260] successful. +&prompt.sudo; iscsiadm -m session -P 1 + Target: iqn.2026-04.com.example:sles.target (non-flash) + Current Portal: 192.168.122.200:3260,1 + Persistent Portal: 192.168.122.200:3260,1 + ********** + Interface: + ********** + Iface Name: default + Iface Transport: tcp + Iface Initiatorname: iqn.2026-04.com.example:sles.initiator + Iface IPaddress: 192.168.122.181 + Iface HWaddress: default + Iface Netdev: default + SID: 1 + iSCSI Connection State: LOGGED IN + iSCSI Session State: LOGGED_IN + Internal iscsid Session State: NO CHANGE + +Verify the storage on the initiator: +&prompt.sudo; lsblk + NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS +sda 8:0 0 20G 0 disk + sr0 11:0 1 1024M 0 rom + vda 254:0 0 25G 0 disk + ├─vda1 254:1 0 8M 0 part + ├─vda2 254:2 0 23G 0 part /usr/local + │ /root + │ /var + │ /srv + │ /opt + │ /home + │ /boot/grub2/x86_64-efi + │ /boot/grub2/i386-pc + │ /.snapshots + │ / + └─vda3 254:3 0 2G 0 part [SWAP] + + +Verify the SCSI properties: +&prompt.sudo; lsscsi + [0:0:0:0] cd/dvd QEMU QEMU DVD-ROM 2.5+ /dev/sr0 + [6:0:0:0] disk LIO-ORG test_storage 4.0 /dev/sda + + + \ No newline at end of file