LIO (linux-iscsi.org) is the standard open-source multiprotocol SCSI target for Linux. LIO replaced the STGT (SCSI Target) framework as the standard unified storage target in Linux with Linux kernel version 2.6.38 and later. YaST supports the iSCSI LIO Target Server software in SUSE Linux Enterprise Server 11 SP3 and later.
This section describes how to use YaST to configure an iSCSI LIO Target Server and set up iSCSI LIO target devices. You can use any iSCSI initiator software to access the target devices.
Use the YaST Software Management tool to install the iSCSI LIO Target Server software on the SUSE Linux Enterprise Server server where you want to create iSCSI LIO target devices.
Launch YaST as the root user.
Select
Select the tab, type lio,
then click .
Select the iSCSI LIO Target Server packages:
|
iSCSI LIO Target Server Packages |
Description |
|---|---|
|
|
Provides a GUI interface in YaST for the configuration of iSCSI LIO target devices. |
|
|
Provides APIs for configuring and controlling iSCSI LIO target
devices that are used by
|
|
|
Provides SNMP (Simple Network Management Protocol) monitoring of
iSCSI LIO target devices by using the dynamic load module
(
The For information about Net-SNMP, see the open source Net-SNMP Project (http://www.net-snmp.org/). |
|
|
Provides debug information for the |
In the lower right corner of the dialog box, click to install the selected packages.
When you are prompted to approve the automatic changes, click
to accept the iSCSI LIO Target Server
dependencies for the lio-utils,
perl-SNMP, and net-snmp
packages.
Close and re-launch YaST, then click and verify that the option is available in the menu.
Continue with Section 15.2, “Starting the iSCSI LIO Target Service”.
The iSCSI LIO Target service is by default configured to be started manually. You can configure the service to start automatically on system restart. If you use a firewall on the server and you want the iSCSI LIO targets to be available to other computers, you must open a port in the firewall for each adapter that you want to use for target access. TCP port 3260 is the port number for the iSCSI protocol, as defined by IANA (Internet Assigned Numbers Authority).
To configure the iSCSI LIO Target Server service settings:
Log in to the iSCSI LIO target server as the
root user, then launch a terminal console.
Ensure that the /etc/init.d/target daemon is
running. At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
You can also search for “lio”, then select .
In the iSCSI LIO Target Overview dialog box, select the tab.
Under , specify how you want the iSCSI LIO target service to be started:
When Booting: The service starts automatically on server restart.
Manually: (Default) You must start the service manually after a server restart. The target devices are not available until you start the service.
If you use a firewall on the server and you want the iSCSI LIO targets to be available to other computers, open a port in the firewall for each adapter interface that you want to use for target access.
Firewall settings are disabled by default. They are not needed unless you deploy a firewall on the server. The default port number is 3260. If the port is closed for all of the network interfaces, the iSCSI LIO targets are not available to other computers.
On the tab, select the check box to enable the firewall settings.
Click to view or configure the network interfaces to use.
All available network interfaces are listed, and all are selected by default.
For each interface, specify whether to open or close a port for it:
Open: Select the interface’s check box to open the port. You can also click to open a port on all of the interfaces.
Close: Deselect the interface’s check box to close the port. You can also click to close the port on all of the interfaces.
Click to save and apply your changes.
If you are prompted to confirm the settings, click to continue, or click to return to the dialog box and make the desired changes.
Click to save and apply the iSCSI LIO Target service settings.
Log in as the root user, then launch a
terminal console.
At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
In the YaST Services Manager dialog box, select () in the list of services.
If the service is listed as inactive, click
to change this.
Click .
The iSCSI LIO Target Server software supports the PPP-CHAP (Point-to-Point Protocol Challenge Handshake Authentication Protocol), a three-way authentication method defined in the Internet Engineering Task Force (IETF) RFC 1994 (http://www.ietf.org/rfc/rfc1994.txt). iSCSI LIO Target Server uses this authentication method for the discovery of iSCSI LIO targets and clients, not for accessing files on the targets. If you do not want to restrict the access to the discovery, use . The option is enabled by default. If authentication for discovery is enabled, its settings apply to all iSCSI LIO target groups.
We recommend that you use authentication for target and client discovery in production environments.
If authentication is needed for a more secure configuration, you can use incoming authentication, outgoing authentication, or both. requires an iSCSI initiator to prove that it has the permissions to run a discovery on the iSCSI LIO target. The initiator must provide the incoming user name and password. requires the iSCSI LIO target to prove to the initiator that it is the expected target. The iSCSI LIO target must provide the outgoing user name and password to the iSCSI initiator. The user name and password pair can be different for incoming and outgoing discovery.
To configure authentication preferences for iSCSI LIO targets:
Log in to the iSCSI LIO target server as the
root user, then launch a terminal console.
Ensure that the /etc/init.d/target daemon is
running. At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
You can also search for “lio”, then select .
In the iSCSI LIO Target Overview dialog box, select the tab to configure the authentication settings. Authentication settings are disabled by default.
Specify whether to require authentication for iSCSI LIO targets:
Disable authentication: (Default) Select the check box to disable incoming and outgoing authentication for discovery on this server. All iSCSI LIO targets on this server can be discovered by any iSCSI initiator client on the same network. This server can discover any iSCSI initiator client on the same network that does not require authentication for discovery. Skip Step 7 and continue with Step 8.
Enable authentication: Deselect the check box. The check boxes for both and are automatically selected. Continue with Step 7.
Configure the authentication credentials needed for incoming discovery, outgoing discovery, or both. The user name and password pair can be different for incoming and outgoing discovery.
Configure incoming authentication by doing one of the following:
Disable incoming authentication: Deselect the check box. All iSCSI LIO targets on this server can be discovered by any iSCSI initiator client on the same network.
Enable incoming authentication: Select the check box, then specify an existing user name and password pair to use for incoming discovery of iSCSI LIO targets.
Configure outgoing authentication by doing one of the following:
Disable outgoing authentication: Deselect the check box. This server can discover any iSCSI initiator client on the same network that does not require authentication for discovery.
Enable outgoing authentication: Select the check box, then specify an existing user name and password pair to use for outgoing discovery of iSCSI initiator clients.
Click to save and apply the settings.
The iSCSI LIO target configuration exports existing block devices to iSCSI initiators. You must prepare the storage space you want to use in the target devices by setting up unformatted partitions or devices on the server. iSCSI LIO targets can use unformatted partitions with Linux, Linux LVM, or Linux RAID file system IDs.
After you set up a device or partition for use as an iSCSI target, you never access it directly via its local path. Do not specify a mount point for it when you create it.
Launch YaST as the root user.
In YaST, select .
Click to continue through the warning about using the Partitioner.
At the bottom of the Partitions page, click to create a partition, but do not format it, and do not mount it.
On the Expert Partitioner page, select , then select the leaf node name (such as
sdc) of the disk you want to configure.
Select , then click .
Specify the amount of space to use, then click .
Under , select , then select the file system ID type from the drop-down list.
iSCSI LIO targets can use unformatted partitions with Linux (0x83), Linux LVM (0x8E), or Linux RAID (0xFD) file system IDs.
Under , select .
Click .
Repeat Step 4 to create an unformatted partition for each area that you want to use later as an iSCSI LIO target.
Click to keep your changes, then close YaST.
You can use a virtual machine guest server as a iSCSI LIO Target Server. This section describes how to assign partitions to a Xen virtual machine. You can also use other virtual environments that are supported by SUSE Linux Enterprise Server 11 SP2 or later.
In a Xen virtual environment, you must assign the storage space you want to use for the iSCSI LIO target devices to the guest virtual machine, then access the space as virtual disks within the guest environment. Each virtual disk can be a physical block device, such as an entire disk, partition, or volume, or it can be a file-backed disk image where the virtual disk is a single image file on a larger physical disk on the Xen host server. For the best performance, create each virtual disk from a physical disk or a partition. After you set up the virtual disks for the guest virtual machine, start the guest server, then configure the new blank virtual disks as iSCSI target devices by following the same process as for a physical server.
File-backed disk images are created on the Xen host server, then
assigned to the Xen guest server. By default, Xen stores file-backed
disk images in the
/var/lib/xen/images/vm_name
directory, where
vm_name is the name of
the virtual machine.
For example, if you want to create the disk image
/var/lib/xen/images/vm_one/xen-0 with a size of 4
GB, first ensure that the directory is there, then create the image
itself.
Log in to the host server as the root user.
At a terminal console prompt, enter the following commands:
mkdir -p /var/lib/xen/images/vm_one dd if=/dev/zero of=/var/lib/xen/images/vm_one/xen-0 seek=1M bs=4096 count=1
Assign the file system image to the guest virtual machine in the Xen configuration file.
Log in as the root user on the guest server,
then use YaST to set up the virtual block device by using the process
in Section 15.4.1, “Partitioning Devices”.
You can use YaST to configure iSCSI LIO target devices. YaST uses APIs
provided by the lio-utils software. iSCSI LIO targets
can use unformatted partitions with Linux, Linux LVM, or Linux RAID file
system IDs.
Before you begin, create the unformatted partitions that you want to use as iSCSI LIO targets as described in Section 15.4, “Preparing the Storage Space”.
Log in to the iSCSI LIO target server as the
root user, then launch a terminal console.
Ensure that the /etc/init.d/target daemon is
running. At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
You can also search for “lio”, then select .
In the iSCSI LIO Target Overview dialog box, select the tab to configure the targets.
Click , then define a new iSCSI LIO target group and devices:
The iSCSI LIO Target software automatically completes the , , , , and fields. is selected by default.
If you have multiple network interfaces, use the IP address drop-down list to select the IP address of the network interface to use for this target group.
Select if you want to require client authentication for this target group.
Requiring authentication is recommended in a production environment.
Click , browse to select the device or partition, specify a name, then click .
The LUN number is automatically generated, beginning with 0. A name is automatically generated if you leave the field empty.
(Optional) Repeat Step 6.a through Step 6.c to add more targets to this target group.
After all desired targets have been added to the group, click .
On the Modify iSCSI Target Client Setup page, configure information for the clients that are permitted to access LUNs in the target group:
After you specify at least one client for the target group, the , , , and buttons are enabled. You can use or to add more clients for the target group.
Add: Add a new client entry for the selected iSCSI LIO target group.
Edit LUN: Configure which LUNs in the iSCSI LIO target group to map to a selected client. You can map each of the allocated targets to a preferred client LUN.
Edit Auth: Configure the preferred authentication method for a selected client. You can specify no authentication, or you can configure incoming authentication, outgoing authentication, or both.
Delete: Remove a selected client entry from the list of clients allocated to the target group.
Copy: Add a new client entry with the same LUN mappings and authentication settings as a selected client entry. This allows you to easily allocate the same shared LUNs, in turn, to each node in a cluster.
Click , specify the client name, select or deselect the check box, then click to save the settings.
Select a client entry, click , modify the LUN mappings to specify which LUNs in the iSCSI LIO target group to allocate to the selected client, then click to save the changes.
If the iSCSI LIO target group consists of multiple LUNs, you can allocate one or multiple LUNs to the selected client. By default, each of the available LUNs in the group are assigned to a Client LUN.
To modify the LUN allocation, perform one or more of the following actions:
Add: Click to create an new entry, then use the drop-down list to map a Target LUN to it.
Delete: Select the entry, then click to remove a Target LUN mapping.
Change: Select the entry, then use the drop-down list to select which Target LUN to map to it.
Typical allocation plans include the following:
A single server is listed as a client. All of the LUNs in the target group are allocated to it.
You can use this grouping strategy to logically group the iSCSI SAN storage for a given server.
Multiple independent servers are listed as clients. One or multiple target LUNs are allocated to each server. Each LUN is allocated to only one server.
You can use this grouping strategy to logically group the iSCSI SAN storage for a given department or service category in the data center.
Each node of a cluster is listed as a client. All of the shared target LUNs are allocated to each node. All nodes are attached to the devices, but for most file systems, the cluster software locks a device for access and mounts it on only one node at a time. Shared file systems (such as OCFS2) make it possible for multiple nodes to concurrently mount the same file structure and to open the same files with read and write access.
You can use this grouping strategy to logically group the iSCSI SAN storage for a given server cluster.
Select a client entry, click , specify the authentication settings for the client, then click to save the settings.
You can require , or you can configure , , or both. You can specify only one user name and password pair for each client. The credentials can be different for incoming and outgoing authentication for a client. The credentials can be different for each client.
Repeat Step 7.a through Step 7.c for each iSCSI client that can access this target group.
After the client assignments are configured, click .
Click to save and apply the settings.
You can modify an existing iSCSI LIO target group as follows:
Add or remove target LUN devices from a target group
Add or remove clients for a target group
Modify the client LUN-to-target LUN mappings for a client of a target group
Modify the user name and password credentials for a client authentication (incoming, outgoing, or both)
To view or modify the settings for an iSCSI LIO target group:
Log in to the iSCSI LIO target server as the
root user, then launch a terminal console.
Ensure that the /etc/init.d/target daemon is
running. At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
You can also search for “lio”, then select .
In the iSCSI LIO Target Overview dialog box, select the tab to view a list of target groups.
Select the iSCSI LIO target group to be modified, then click .
On the Modify iSCSI Target LUN Setup page, add LUNs to the target group, edit the LUN assignments, or remove target LUNs from the group. After all desired changes have been made to the group, click .
For option information, see Step 6 in Section 15.5, “Setting Up an iSCSI LIO Target Group”.
On the Modify iSCSI Target Client Setup page, configure information for the clients that are permitted to access LUNs in the target group. After all desired changes have been made to the group, click .
For option information, see Step 7 in Section 15.5, “Setting Up an iSCSI LIO Target Group”.
Click to save and apply the settings.
Deleting an iSCSI LIO target group removes the definition of the group, and the related setup for clients, including LUN mappings and authentication credentials. It does not destroy the data on the partitions. To give clients access again, you can allocate the target LUNs to a different or new target group, and configure the client access for them.
Log in to the iSCSI LIO target server as the
root user, then launch a terminal console.
Ensure that the /etc/init.d/target daemon is
running. At the command prompt, enter
systemctl start target.service
The command returns a message to confirm that the daemon is started, or that the daemon is already running.
Launch YaST as the root user.
In the YaST Control Center, select , then select .
You can also search for “lio”, then select .
In the iSCSI LIO Target Overview dialog box, select the tab to view a list of configured target groups.
Select the iSCSI LIO target group to be deleted, then click .
When you are prompted, click to confirm the deletion, or click to cancel it.
Click to save and apply the settings.
This section describes some known issues and possible solutions for 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, then try again.
Open a terminal console as the root user.
At the command prompt, enter
systemctl start target.service
You can also enter the following to check if
configfs, iscsi_target_mod, and
target_core_mod are loaded. A sample response is
shown.
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
If you use a firewall on the target server, you must open the iSCSI port that you are using to allow other computers to see the iSCSI LIO targets. For information, see Step 7 in Section 15.2.1, “Configuring iSCSI LIO Startup Preferences”.
A physical storage object that provides the actual storage underlying an iSCSI endpoint.
The standard format for SCSI commands. CDBs are commonly 6, 10, or 12 bytes long, though they can be 16 bytes or of variable length.
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 Internet Engineering Task Force (IETF) (http://www.ietf.org) RFC 1994.
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.
The combination of an iSCSI Target Name with an iSCSI TPG (IQN + Tag).
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.
The originating end of a SCSI session. Typically a controlling device such as a computer.
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.
A name format for iSCSI that uniquely identifies every device in the
world (for example:
iqn.5886.com.acme.tapedrive.sn‐a12345678).
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.
A part of the iSCSI specification that allows multiple TCP/IP connections between an initiator and a target.
A method by which data can take multiple redundant paths between a server and storage.
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).
A document that describes the behavior of SCSI in general terms, allowing for different types of devices communicating over various media.
The receiving end of a SCSI session, typically a device such as a disk drive, tape drive, or scanner.
A list of SCSI target ports that are all treated the same when creating views. Creating a view can help facilitate LUN (logical unit number) mapping. Each view entry specifies a target group, host group, and a LUN.
The combination of an iSCSI endpoint with one or more LUNs.
A list of IP addresses and TCP port numbers that determines which interfaces a specific iSCSI target will listen to.
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).