iSCSI – how coomunicate using commands

iSCSI commands:-

In SCISI computer storage , computers and storage devices use a client-server model of communication. The computer is a client which requests the storage device to perform a service, e.g., to read or write data. The SCSI command architecture was originally defined for parallel buses but has been carried forward with minimal change for use with Fiber Channel, iSCSI, Serial Attached iSCSI, and other transport layers.

In the SCSI protocol, the initiator  sends a SCSI command information unit to the target device. Data information units may then be transferred between the computer and device. Finally, the device sends a response information unit to the computer.

SCSI commands are sent in a Command Descriptor Block (CDB), which consists of a one byte operation code (opcode) followed by five or more bytes containing command-specific parameters. Upon receiving and processing the CDB the device will return a status code byte and other information.



By carrying SCSIcommands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI can be used to transmit data over Local Area Networks(LANs), Wide Area Networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

iSCSI works by transporting block-level data between an iSCSI initiator on a server and an iSCSI target on a storage device. The iSCSI protocol encapsulated SCSI commands and assembles the data in packets for the TCP/IP layer. Packets are sent over the network using a point-to-point connection. Upon arrival, the iSCSI protocol disassembles the packets, separating the SCSI commands so the operating system (OS) will see the storage as a local SCSI device that can be formatted as usual. Today, some of iSCSI’s popularity in small to midsize businesses (SMBs) has to do with the way server vitulization makes use of storage pools. In a vitalized environment, the storage pool is accessible to all the hosts within the cluster and the cluster nodes nodes communicate with the storage pool over the network through the use of the iSCSI protocol.

iSCSI (SCSI over the internet)

iSCSI:- SCSI over the internet.

SCSI (Small computer system interface) – It is the set of standards (protocol) to connecting and transferring data between volumes(machines/peripheral devices ).

The SCSI standards define commands, protocols, electrical and optical interfaces.

SCSI is most commonly used for hard disk drive and tape drives, but it can connect a wide range of other devices, including scanners and CD drives, although not all controllers can handle all devices.

By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances.

iSCSI can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

Typically, a computer is an initiator and a data storage device is a target. As in a client-server architecture, an initiator is analogous to the client, and a target is analogous to the server.

SCSI initiator:-

In computer data storage, a SCSI initiator is the endpoint that initiates a SCSI session, that is, sends a SCSI command. The initiator usually does not provide any Logical Unit Number (LUNs).

SCSI target:-

On the other hand, a SCSI target is the endpoint that does not initiate sessions, but instead waits for initiators’ commands and provides required input/output data transfers. The target usually provides to the initiators one or more LUNs because otherwise no read or write command would be possible.

sshpass is not working

When you are tying to sshpass from another machine. You may suffer from Following problem:-

When you enter a command for sshpass , you will not get prompt of new machine you wanted to login.You will get a prompt of your current machine.


root@local$  sshpass -p ‘password’ ssh usenarme@

after fired this command  get a prompt of your current machine.




In that case.Login to your machine you want to sshpass.

install sshpass (sudo apt-get install sshpass)

After installation , please reboot your machine.(that is the most important thing )

and try the sshpass command again.

You will be able to login your desired machine.


root@local$  sshpass -p ‘password’ ssh usenarme@

you will get a prompt .


The above prompt is the prompt of a machine.You wanted to  login using sshpass.



Install and setup DevStack on Linux

Step 1:

Take a fresh/new Linux machine/virtual machine.

Step 2:

Install  ‘git’ on that machine.  (sudo apt-get install git)

Step 3:

Download/clone DevStack using git.

(git clone

Step 4:

You will found a ‘devstack’ directory.

Go to that directory.(cd devstack)

You will find a file ‘stackrc’.

Do following changes in that file.

you will find  a line -GIT_BASE=${GIT_BASE:-git://}’

line number may 169(may variable).

Remove/comment out this line.

Insert the line – ‘GIT_BASE=${GIT_BASE:-}’


Step 5:

Copy the file local.conf from ‘devstack/samples’ directory to ‘devstack’ directory and remove the rest contents and put only the following lines in it :










Step 6:

Run devstack and ./ with non sudo user (strictly))

./ will ask you for password 5-6 times.

Provide the same password all the time.

It will take around 30-45 mins to run the script.

Step 7:

After successful installation at the end, it will show you following

4 important things.

host ip, Horizon’s (devstack’s dashboard) ip address ,default users,password.

Save those things , those will be require in future to run any devstack commands.




Good source of knowledge and problem solver for software engineers.