iSCSI

iSCSI (Abreviatura de Internet SCSI) es un estándar que permite el uso del protocolo SCSI sobre redes TCP/IP. iSCSI es un protocolo de la capa de transporte definido en las especificaciones SCSI-3. Otros protocolos en la capa de transporte son SCSI Parallel Interface y canal de fibra.

La adopción del iSCSI en entornos de producción corporativos se ha acelerado en estos momentos gracias al aumento del Gigabit Ethernet. La fabricación de almacenamientos basados en iSCSI (red de área de almacenamiento) es menos costosa y está resultando una alternativa a las soluciones SAN basadas en Canal de fibra.

El protocolo iSCSI utiliza TCP/IP para sus transferencias de datos. Al contrario que otros protocolos de red diseñados para almacenamiento, como por ejemplo el canal de fibra (que es la base de la mayor parte de las redes de áreas de almacenamiento), solamente requiere un simple y una sencilla interfaz Ethernet (o cualquier otra red compatible TCP/IP) para funcionar. Esto permite una solución de almacenamiento centralizada de bajo coste sin la necesidad de realizar inversiones costosas ni sufrir las habituales incompatibilidades asociadas a las soluciones canal de fibra para redes de área de almacenamiento.

Los críticos de iSCSI argumentan que este protocolo tiene un peor rendimiento que el canal de fibra ya que se ve afectado por la sobrecarga que generan las transmisiones TCP/IP (cabeceras de paquetes, por ejemplo). Sin embargo las pruebas que se han realizado muestran un excelente rendimiento de las soluciones iSCSI SANs, cuando se utilizan enlaces Gigabit Ethernet.

En el contexto de almacenamiento, iSCSI permite a un ordenador utilizar un iniciador iSCSI (initiator) para conectar a un dispositivo SCSI (target) como puede ser un disco duro o una cabina de cintas en una red IP para acceder a los mismos a nivel de bloque. Desde el punto de vista de los drivers y las aplicaciones de software, los dispositivos parecen estar conectados realmente como dispositivos SCSI locales. Los entornos más complejos, consistentes en múltiples hosts y/o dispositivos son llamados redes de área de almacenamiento.

Los dispositivos iSCSI no deben ser confundidos con los dispositivos Network-Attached Storage (NAS), los cuales incluyen software en el servidor para controlar las peticiones de acceso simultáneo desde los diferentes hosts. Permitir que múltiples hosts tengan acceso simultáneo a un dispositivo único es una tarea difícil pero muy común en los dispositivos SCSI. Sin comunicación host-a-host, cada uno de los hosts desconoce cuáles son las intenciones del resto de los hosts.

The initiator is the name of the iSCSI client. The iSCSI client has a block level access to the iSCSI devices, which can be a disk, tape drive, DVD/CD writer. One client can use multiple iSCSI devices.

The target is the name of the iSCSI server. The iSCSI server offers its devices (disks, tape, dvd/cd … etc.) to the clients. One device can by accessed by one client.

Discovery is the process which shows the targets for the initiator.

Describes the way in which the iSCSI targets can be found.The methods are currently available:

  • Internet Storage Name Service (iSNS) - Potential targets are discovered by interacting with one or more iSNS servers.
  • SendTargets – Potential targets are discovered by using a discovery-address.
  • SLP - Discover targets via Service Location protocol (RFC 4018)
  • Static – Static target adress is specified.

The RFC document also covers the iSCSI names.The iSCSI name consists of two parts: type string and unique name string.

The type string can be the following:

  • iqn. : iscsi qualifiled name
  • eui. : eui-64 bit identifier

Most of the implementations use the iqn format. Let'S see our initiator name: iqn.1993-08.org.debian:01.35ef13adb6d

iqn : we use iSCSI qualified name adress. 1993-08 : the year of the month on which the naming authority acquired the domain name which is used in the iSCSI name. org.debian : reversed dns name which defines the organizational naming authority. 01.35ef13adb6d : this string is defined by the naming authority.

Our target name is similar (iqn.1992-08.com.netapp:sn.84211978). The difference is that contains the serial number of Netapp filer. Both names are user editable (initiator,target). We need also two ip adresses for the the target and for the initator, too.

The following figure shows our demo environment. It consists of one Debian host which is the iSCSI initiator, and accesses the iSCSI disk via /dev/sdb device. The Netapp filer is our iSCSI target device, which offers /vol/iscsivol/tesztlun0 disk or lun for the Debian Linux host. The iSCSI session consists of login phase, then the data exchange phase.

Special names refer to both iSCSI initiators and targets. iSCSI provides three name-formats:

iSCSI Qualified Name (IQN)

Format: The iSCSI Qualified Name is documented in RFC 3720, with further examples of names in RFC 3721. Briefly, the fields are:

  • literal iqn
  • date (yyyy-mm) that the naming authority took ownership of the domain
  • reversed domain name of the authority (org.alpinelinux, com.example, to.yp.cr)
  • Optional “:” prefixing a storage target name specified by the naming authority.

From the RFC:

                  Naming     String defined by
     Type  Date    Auth      "example.com" naming authority
    +--++-----+ +---------+ +-----------------------------+
    |  ||     | |         | |                             |     
 
    iqn.2001-04.com.example:storage:diskarrays-sn-a8675309
    iqn.2001-04.com.example
    iqn.2001-04.com.example:storage.tape1.sys1.xyz
    iqn.2001-04.com.example:storage.disk2.sys1.xyz

[root@miniserver ~]# yum install iscsi-initiator-utils
Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package iscsi-initiator-utils.i386 0:6.2.0.871-0.20.el5_5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch  Version                 Repository           Size
================================================================================
Installing:
 iscsi-initiator-utils  i386  6.2.0.871-0.20.el5_5    rhel-i386-server-5  795 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 795 k
Is this ok [y/N]: y
Downloading Packages:
iscsi-initiator-utils-6.2.0.871-0.20.el5_5.i386.rpm      | 795 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : iscsi-initiator-utils                                    1/1

Installed:
  iscsi-initiator-utils.i386 0:6.2.0.871-0.20.el5_5

Complete!

El servicio de iscsi puede ser iniciado con el siguiente comando.

/etc/init.d/iscsi start

The iSCSI operations can be controlled with the iscsiadm command. The command can discover the targets, login/logout to the target, and displays the session information.

The configuration files are under the /etc/iscsi directory:

  • iscsid.conf: Configuration file for the iscsi daemon. It is read at startup.
  • initiatorname.iscsi: The name of initator, which the daemon reds at the startup.
  • nodes directory: The directory contains the nodes and their targets.
  • send_targets directory: The directory contains the discovered targets.

NetApp.

Este ambiente contiene un host RedHat Enterprise Linux 5 y un NetApp. El RHEL es el initiator y el NetApp es el target.