iSCSI: Introduction and Steps to Configure iSCSI Initiator and Target

In today’s information age, data is growing at an explosive pace and consequently storage requirements within enterprises are skyrocketing. This massive bulk of information is transferred through networks which tie end-users to storage and servers. Given the rate at which data is expanding, every organization needs to ensure efficient storage and management of information.

As interesting as the challenge is, what exactly is required to address it? This is where iSCSI comes into the picture. This blog provides an introduction to iSCSI and further explores the following topics:

  • iSCSI architecture
  • iSCSI benefits
  • iSCSI PDU
  • iSCSI components
  • Configuration of iSCSI target
  • Configuration of iSCSI initiator
  • iSCSI Conformance Test Suite

Introduction

iSCSI is an industry standard protocol which allows sharing of block storage over Ethernet. It is a protocol for communicating with I/O devices, chiefly storage devices. iSCSI is an IP-based standard for connecting data storage devices over a network and moving data by carrying SCSI commands over IP networks. In simple words, iSCSI is an interface for communication between initiator and target.

One may ask why iSCSI is recommended over other protocols. iSCSI is very cost efficient and can be easily understood by any IT guy. iSCSI is a flexible protocol which can work within any environment. iSCSI does not require dedicated cabling, it can be run over existing IP infrastructure. It can be deployed on local or wide area networks through the use of Internet across distributed resources. Another reason iSCSI is widely used is because many operating systems support iSCSI configuration.

iSCSI Architecture:

iSCSI operates through a client-server architecture. Clients of an iSCSI interface are called “initiators”. Servers of an iSCSI interface are called “targets”.

iscsi -1
Source: RFC 3720

The server that shares storage is called iSCSI target. The server (machine) that consumes storage is
called iSCSI initiator. iSCSI resides on the transport layer of OSI Architecture. iSCSI uses TCP/IP protocol for sharing data.

Why TCP/IP ?

There is no packet loss while transferring data, if there is any loss, it is handled by the TCP/IP stack in the operating system.The iSCSI protocol is a mapping of the SCSI remote procedure invocation model over the TCP protocol. SCSI commands are carried by iSCSI requests and SCSI responses and status are carried by iSCSI responses. iSCSI makes use of the request response mechanism.

The initiator and target divide their communications into messages. The messages are transferred in terms of “iSCSI protocol data unit” (iSCSI PDU). Communication between the initiator and target takes place over one or multiple TCP connections. The TCP connection transports control messages, SCSI commands, data and parameters through iSCSI Protocol Data Units (iSCSI PDUs). The group of TCP connections that tie an initiator to a target form a session.

A session ID defines a session and consists of an initiator part and a target part. TCP connections can be added and deleted from a session. All connections in a session are identified through a connection ID (CID).

The figure below depicts the basic structure of iSCSI using TCP/IP network.

basic structure of iSCSI using TCP IP network
Basic structure of iSCSI using TCP IP network

iSCSI Benefits

  • iSCSI provides cheap connectivity as compared to FC.
  • An existing network can be used for iSCSI implementation.
  • As iSCSI is used for block storage, it is very fast.
  • IT folks don’t need a lot of training on iSCSI storage since it is very easy to understand and implement.
  • iSCSI is an IP-based protocol. It leverages the interoperability benefits of TCP/IP and Ethernet.

iSCSI Protocol Data Unit(Pdu)

iSCSI PDU is the information unit of iSCSI. PDU is used for communication between the initiator and the target. This communication includes detection of node, connecting and establishing sessions, transporting iSCSI commands and moving data.

The figure below depicts the basic structure of iSCSI PDU.

basic structure of iSCSI PDU
Basic structure of iSCSI PDU

Operation codes for iSCSI initiators:

Observe that most of these codes are enlisted as “request” codes. The codes below are hexadecimal (hex) and contain the “0x” prefix.

  • 0×00 – NOP-Out
  • 0×01 – SCSI Command
  • 0×02 – SCSI Task Management Function Request
  • 0×03 – Login Request
  • 0×04 – Text Request
  • 0×05 – SCSI Data-Out
  • 0×06 – Logout Request
  • 0×10 – SNACK Request
  • 0×1C-0×1E – Vendor specific codes


Operation codes for iSCSI targets:

  • 0×20 – NOP-In
  • 0×21 – SCSI Response
  • 0×22 – SCSI Task Management function response
  • 0×23 – Login Response
  • 0×24 – Text Response
  • 0×25 – SCSI Data-In
  • 0×26 – Logout Response
  • 0×31 – Ready To Transfer (R2T)
  • 0×32 – Asynchronous Message
  • 0×3C-0×3E – Vendor specific codes
  • 0×3F – Reject

iSCSI Components

  • iSCSI Initiator – The client machine within a storage network is an iSCSI Initiator. The initiator can connect to the target by forming a session among them and can send iSCSI commands.
  • iSCSI Target – The server machine within a storage network is an iSCSI target. An iSCSI target is any machine that receives iSCSI commands from an initiator.

Configuration Of An iSCSITarget

iSCSI configuration can be performed on any platform. The configuration shown below is for a Linux environment with Fedora 20 operating system.

Prerequisites for iSCSI configuration include:

  • Create two Virtual Machines using Virtual Box. One is for Target and the other is for Initiator. Ensure that both Target and Initiator can ping each other.
  • Minimum RAM of 512MB and minimum disk size of 2GB for each VM.

Steps To Configure iSCSITarget

Step 1:- The very first step is to install the targetcli package. Targetcli package is used for configuring the iSCSI Target, to create a disk of the required size and to assign a port number. Targetcli is invoked as root from the command prompt.

step 1

Step 2:- Create a disk of the required size in fileio with a specific name.

step 2

After creating a disk in fileio, that particular disk will be in a deactivated state, until the disk is created in a logical unit (LUN).

Step 3:- Create a server IQN address with a worldwide unique name used as an identifier. More than one IQN can be specified for it. IQN is created in the iSCSI path of targetcli.

step 3
Step 4:- Create client IQN address with the same unique name.

step 4

Step 5:- Form a Logical Unit for the created disk

step 5

After creating LUN for the disk, it will change to an activated state.

step 51
Step 6:- In the path of portals, a default IP is created. Delete that IP and assign an IP for the target.

step 6
Save and exit from targetcli.

Step 7:- Start the firewall using the systemctl command and make the service permanent.

step 7

Step 8:- Finally check the status of the target. If it is disabled, enable it.

step 8

In the figure above the status of the target is enabled.

The configuration of the target is successful.

Configuration Of iSCSI Initiator

Steps To Configure iSCSITarget

Step 1:- Install iSCSI-initiator-utils package to configure iSCSI initiator.

config step 1

Step 2:- Discover the target using iscsiadm command.

config step 2

Step 3:- Update the server IQN address in the Initiatorname.iSCSI file as shown in the figure below.

config step 31

config step 32

Step 4:- Login to the target using iscsiadm command.

config step 4

The configuration of the initiator is successful.

iSCSI Conformance Test Suite

So far, we have learned what iSCSI is, where it is used,why it is used, and its pros and cons. Now, let us discuss the iSCSI conformance test suite.

iSCSI has its own standard which is RFC 3720. iSCSI with RFC 3720 can work within any environment.

What is iSCSI conformance testing?

Conformance testing is a non-functional testing method which is used to validate whether iSCSI meets the organization’s agreed standards. Conformance testing is performed to determine if iSCSI initiator and target meet iSCSI standards. This can be done through the iSCSI test suite.

Calsoft has developed its proprietary test suite to enable effortless iSCSI conformance testing. The suite is based on the standards of RFC 3720. For more information visit the following links:

[Tweet “iSCSI: Introduction and Steps to Configure iSCSI Initiator and Target ~ via @CalsoftInc”]

Want to know more about our test suite that enables effortless iSCSI conformance testing? 

 
Share:

Related Posts

Technical Documentation

Technical Documentation Review and Tips

Technical reviews are vital for effective and quality documentation. To make this happen, have documentation and its reviews listed as one of the deliverables – just like development or testing. This will place priority on the process, and ensure everyone involved understands the importance of proper and thorough reviews.

Share:
Understanding the Potential of Storage and Security in IoT

Understanding the Potential of Storage and Security in IoT

The potential of storage and security in IoT plays a significant role in transforming industries and the lives of people. However, tackling challenges such as data isolation, interoperability, and scalability will be essential in underpinning this potential. To embrace the full potential of storage and security in IoT involves a holistic method, incorporating technological advancements with comprehensive tactics. Read the blog to understand the potential of security and storage in the IoT ecosystem, its challenges, and keyways to overcome them.

Share:
Technology Trends 2024

Technology Trends 2024- The CXO perspective

In the rapidly evolving landscape of 2024, technology trends are reshaping industries and redefining business strategies. From the C-suite perspective, executives are navigating a dynamic environment where artificial intelligence, augmented reality, and blockchain are not just buzzwords but integral components of transformative business models. The Chief Experience Officers (CXOs) are at the forefront, leveraging cutting-edge technologies to enhance customer experiences, streamline operations, and drive innovation. This blog delves into the strategic insights and perspectives of CXOs as they navigate the ever-changing tech terrain, exploring how these leaders are shaping the future of their organizations in the era of 2024’s technological evolution.

Share:
Technology Trends 2024

The Winds of Technology Blowing into 2024

As 2023 draws to a close, the digital landscape is poised for a seismic shift in 2024. Generative Artificial Intelligence (Gen AI) continues its integrative streak, disrupting industries from B2B to healthcare. Networking trends emphasize simplicity, while the synergy of cloud and edge computing with Gen AI promises real-time workflows. Quantum computing, cybersecurity, intelligent automation, and sustainable technology are key players, reshaping the technological fabric. Join us as we navigate the transformative currents of 2024, unraveling the impact on enterprises in our forthcoming article. Stay tuned for the tech evolution ahead!

Share:
MicroStream: Modernizing Data Storage

MicroStream: Modernizing Data Storage

MicroStream is an efficient Java persistence framework meant for continuous object storage and recovery. MicroStream’s lightweight solution and in-memory storage policy enables rapid development and augments application speed, making it an ideal choice for microservices architectures, serverless systems, embedded systems, and real-time applications. Read the blog to explore how MicroStream is reforming the outlook of data persistence.

Share:
Generative AI Shaping Future Industries

[Infoblog] Generative AI Shaping Future Industries

Generative AI is at the forefront of innovation, harnessing the power of machine learning algorithms to create new and original content, from images and music to entire virtual environments. This infographic depicts how Gen AI is evolving industries and shaping its future.

Share: