scsi- the protocol for all storage architectures

52
Page 1 SCSI The Protocol fo r All Storage Archi tectures Copyright 2003 Storage Networking Industry Association. All Rights Reserved. SCSI - The Protoco l f or all Storage A rchi t ectures Davi d Demi ng , President Solution Technolo gy

Upload: tirthnkr

Post on 04-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 1/52

Page 1

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

SCSI - The Protocol for all

Storage Architectures

David Deming, President

Solution Technology

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 2/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 2

SNIA Legal Notices

• The material contained in this tutorial is

copyrighted by SNIA• Member companies and individuals may use this

material in presentations and literature under thefollowing conditions:  Any slide or slides used must be reproduced without

modification

SNIA must be acknowledged as the source of any materialused in the body of any document containing material fromthese presentations

• This presentation is a project of the SNIAEducation Committee

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 3/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 3

Objectives

• Brief understanding of SCSI and its history

• Understanding of industry standards and the roleof the SCSI Architecture

• Understanding the SCSI Architecture model

• Understanding the I/O Operation and theimportance behind SCSI Protocol

• Learn how parallel SCSI, Fibre Channel, and iSCSI

rely on the SCSI Architecture to support storageapplications

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 4/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 4

Brief History

• SCSI-1: In the beginning – 1987 SCSI was adapted from the SASI Interface (1979)

Specif ied a physical interface, transport protocol, and

standard command for disk, tape, and other storagedevices

• SCSI-2: Second coming of SCSI Speed and bus width enhancements

Multi-threading commands and transport protocolcleanup

 Added more storage device type command sets

• SCSI-3: Today and beyond More speed: Ultra-2/Ultra-160/Ultra-320

Separation of Physical Interface, Transport Protocols, andthe SCSI Command Sets

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 5/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 5

SCSI Today and the Future

• SCSI Language SCSI is the Language of Love

Every architecture uses the SCSI command sets Every architecture uses the SCSI upper layer protocol

• SCSI Transport

Defines protocol mapping and control of SCSI language Fibre Channel Protocol (FCP), Serial Storage Architecture

(SSA), Serial Bus Protocol (SBP), iSCSI, Serial ATA(SATA), Serial Attached SCSI (SAS)

• SCSI Physical Architectures Serial SCSI – the future of the SCSI physical interface

Fibre Channel, SSA, 1394, ATAPI, TCP/IP

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 6/52

Page 6

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

Introduction to Standards

SCSI Standards and their impact on all

storage interfaces

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 7/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 7

Standards Organizations

T13 – ATAT13 – ATA

IEEE-1394

(Firewire)IEEE-1394

(Firewire)

International Organization for Standards (ISO)International Organization for Standards (ISO)

 American National Standards Institute (ANSI) American National Standards Institute (ANSI)

INCITSINCITS

Ethernet(802.x)

Ethernet

(802.x)

IEEEIEEE

iFCPiFCP

IETFIETF

T11 – FCT11 – FC

T10 – SCSIT10 – SCSIInternetProtocolInternetProtocol

iSCSIiSCSI

FCIPFCIP

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 8/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 8

SCSI Standards

Physical

Interfaces

Shared Command Set

 Architectural Model

Device

Specific

Command

Sets

Transport

Protocols

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 9/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 9

Protocol Service Model

SCSI

 ApplicationSCSI

 Application

SCSI

 ApplicationSCSI

 Application

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

Interconnect

ServicesInterconnect

Services

Interconnect

ServicesInterconnect

Services

 Application

Layer 

Transport

Protocol

Layer 

Interconnect

Layer 

Command Set

Standards

Transport

Protocol

Standards

Interconnect

Standards

SCSI Transport

Protocol

SCSI Application

Protocol

Protocol Service Interface

Interconnect Service Interface

Client I/O System Server I/O System

 Appl icat ion layer: Clients and servers that originate and process SCSI I/O operat ions by means of a SCSIapplication protocol

Transport protocol layer: Services and protocols through which clients and servers communicate

Interconnect layer: Services, signaling mechanism and interconnect subsystem needed for the physicaltransfer of data from sender to receiver.

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 10/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 10

SCSI Command Sets

• one of the most appealing feature behind the SCSI Architecture, i.e. the SCSI language

includes every type of storage device manufacturedtoday; disk, tape, CD, storage enclosures, etc…

• manufacturer independent and are common for alltypes of devices

• SCSI device drivers and operating systems haveutil ized SCSI Command Sets since the late 80’s

can be used in any storage architecture including FibreChannel, iSCSI, InfiniBand, ATA/IDE, SATA (Serial ATA), SAS (Serial Attached SCSI), 1394 (Firewire)

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 11/52

Page 11

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

SCSI Architectural Model

Characteristics of the SCSI-3

 Architecture

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 12/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 12

The SCSI Distributed Model

Protocol Service Interface

Service Delivery Subsystem

• SCSI is a client-serverprotocol.

The client is called theInitiator (usually the OS I/Osubsystem) and issuesrequests to the server.

• The server is called theTarget (usually the SCSIcontroller that is part of astorage device) andreceives, executes andreturns Initiator requestsand their associatedresponses.

Server Request

Server Response

Client   Server 

Client-Server Transaction

Initiator    Target

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 13/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 13

Client-Server Model•  A single Initiator can have multiple Application Clients.

• Targets have ONE Task Manager and one or more Logical Units (LU), whichare numbered (LUN). The Task Manager:

controls the sequencing of one or more tasks within a LU

carries out the task management funct ions

has the authority to modify Service Requests that have already been received by thetarget

• The Device Server processes operations and directs them to a specific LUN.

Task Management Request

Task Management Response

Initiator    Target

 Appl ication

 Application

 Appl ication

 Application

Clients

Task

Manager 

Device

Server 

Device Server Request

Device Server Response

Logical

Units

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 14/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 14

Re-cap SCSI Terminology

• SCSI is a standard that defines aninterface between an Initiator(usually a computer) and a Target(usually a storage device such as ahard disk, tape backup, or storagearray).

• Interface refers to connectors,cables, electrical signals, opticalsignals and the command protocolthat allow initiators and targets tocommunicate.

• Logical Units are a subset of Targetdevices which can allow forscalability.

Initiator 

Target

Interface

Logical Units

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 15/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 15

SCSI Structural Model

SCSIDeviceSCSI

Device

SCSIDeviceSCSI

Device

SCSIDeviceSCSI

Device

SCSIDeviceSCSI

Device

Service Delivery SubsystemService Delivery Subsystem

Domain

I/O System• Represents a view of theelements comprising a SCSI I/O

system as seen by theapplication clients interactingwith the system.

• The fundamental object is the

SCSI Domain that represents anI/O system.

a Domain is made up of SCSIdevices

and a Service DeliverySubsystem that transportsCommands, Data, and relatedinformation

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 16/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 16

Initiator Device Model

SCSI Initiator 

DeviceSCSI Initiator 

Device

Initiator 

Device

Name

Initiator 

Device

Name

SCSI

Initiator 

Port

SCSI

Initiator 

Port

 Application

Client Application

Client

Initiator 

Port

Name

Initiator 

Port

Name

Initiator 

Port

Identifier 

Initiator 

Port

Identifier 

• A SCSI Initiator device

contains: Zero or more Initiator device

names

One or more SCSI Initiator

ports each containing• an Initiator Port Identifier

• and an optional Init iator Port

Name

One or more ApplicationClients

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 17/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 17

Target Device Model

• A SCSI Target device

contains: Zero or more Target device

names

One or more SCSI Target ports

each containing• a Task Router,

• SCSI Target Port Identif ier,

• and an optional Target Port

Name

One or more Logical Units

SCSI Target

DeviceSCSI Target

Device

Target

Device

Name

Target

Device

Name

SCSI

Target

Port

SCSI

Target

Port

Logical

UnitLogical

Unit

Target

Port

Name

Target

PortName

Target

Port

Identifier 

Target

PortIdentifier 

Target

Router Target

Router 

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 18/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 18

Logical Unit Model

•  A Logical Unit contains:  A Logical Unit Number 

• If access controls are not in effect, one Logical Unit Number per Logical Unit ;or 

• If access controls are in effect, one Logical Unit Number per SCSI Initiatorport that has access rights plus one default Logical Unit Number per LogicalUnit;

One or more Logical Unit names

 A Device Server 

 A Task Manager; and One or more Task Sets each of which may contain zero or more

untagged tasks or a combination of zero or more tagged tasks and zeroor more untagged tasks.

Logical

UnitLogical

Unit

Device

Server Device

Server 

Task Set

(Queue)Task Set

(Queue)

Task

Manager Task

Manager 

UntaggedTask

UntaggedTask

TaggedTask

Tagged

Task

Logical Unit

NameLogical Unit

Name

Logical Unit

Number Logical Unit

Number 

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 19/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 19

Tasks• Task = the work to be performed by the Logical

Unit

 A single Command

 A group of linked Commands

• Two types of SCSI Tasks

Tagged

Untagged

Untagged Task Represented by an I _ T _ L nexus

• Tagged Task

Represented by an I _ T _ L _Q nexus

• Nexus

Methodology used to uniquely identify an I/OOperation between an Initiator, Target, Logical Unit,and an optional Queue Tag

Initiator 

Target

Logical Units

Task

SetsQueue

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 20/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 20

Task Attributes

• There are four types of Task attributes that can affecthow the Target executes each task

Simple• Target can execute in any order

• Target will typically apply a performance algorithm to numeroussimple tasks

Ordered• Target must execute all ordered tasks in the order they are received

•  Any task prior to ordered must be executed before ordered task

Head of queue• Informs Target to insert the task into the front of the queue

 Auto Contingent Allegiance (ACA)• Used when the Target enters into an error condition for a command

that has previously executed

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 21/52

Page 21

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

I/O Operations

Characteristics of SCSI I/O Operations

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 22/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 22

I/O Operation Model

• There are two categories of Protocol Services:

- Execute Command and Confirmation Services- Data Transfer Services

• There are three main phases of an I/O operation

that includes a data transfer:1.Command: Send required command and parameters via a

Command Descriptor Block (CDB)

2.Data: Transfer data in accordance with the command

3.Status: Receive confirmation of command execution

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 23/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 23

SCSI I/O Operations

•  At a minimum, SCSI I/OOperations consist of:

 An Initiator issuing a SCSICommand

 A Target returningcompletion Status

There is no “ Data” transferbetween Initiator andTarget

• Types of Commands that

do not move Data Test Unit Ready

Start/Stop Unit

Rewind

Interconnecting

Subsystem

Interconnecting

Subsystem

SCSI Command

SCSI Status

Initiator Target

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 24/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 24

Operations that move Data

• When an Initiator and Targetneed to exchange information

They util ize a Data phase Data In transmits information from

the Target to the Init iator 

Data Out transmits informationfrom the Init iator to the Target

• Data can be transmitted all atonce or take numerous Dataphases to complete information

transfers• Types of Commands

Read or Write

Inquiry

Interconnecting

Subsystem

Interconnecting

Subsystem

SCSI Command

SCSI Status

Read or Write

Data

Initiator Target

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 25/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 25

Command Descriptor Block

•  A Command is executed by sending a Command DescriptorBlock (CDB) to the Target

• For each CDB

The first byte of the CDB is the Operation Code The last byte of the CDB is the Control Byte

The format of the Operation Code and Control Byte is identical forevery SCSI Command in the SCSI Universe

  bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0

byte 0 Operation code

byte 1 Reserved  (MSB)

byte 2 Logical block address (if required)

byte 3 (LSB)

byte 4Transfer length (if required)

Parameter list length (if required) Allocation length (if required)

byte 5 Control byte

Example

Six Byte CDB

Informs the Target

“where” to start the

transfer 

“How many” blocks

(512 bytes) to transfer “How many”

bytes to transfer 

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 26/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 26

Other CDB Formats

  bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0

byte 0 Operation code

byte 1 Reserved Service Action (if required) 

byte 2 (MSB)

byte 3 Logical block address (if required)

byte 4

byte 5 (LSB)byte 6 Reserved

byte 7 (MSB) Transfer length (if required)Parameter List Length (if required)

byte 8 Allocation length (if required) (LSB)

byte 9 Control byte

bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0

Ten Byte CDB

Twelve Byte CDB

• CBDs can be:

10 bytes

12 bytes

16 bytes

or even

variablebytes in

length

byte 0 Operation code

byte 1 Reserved Service Action (if required)

byte 2 (MSB)

byte 3 Logical block address (if required)

byte 4

byte 5 (LSB)

byte 6 (MSB)

byte 7 Transfer length (if required)

byte 8 Parameter list length (if required)

byte 9 Allocation length (if required) (LSB)

byte 10 Reserved

byte 11 Control byte

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 27/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 27

SCSI Commands all Devices

• There are standard SCSICommands for: Disk

Tape

Storage Enclosures

Disk Arrays CD

WORM

Media Changers

Every device imaginable or notyet created

Op. Code Command Name Type

00h TEST UNIT READY M

03h REQUEST SENSE Z

12h INQUIRY M

15h MODE SELECT(6) Z

18h COPY O

1Ah MODE SENSE(6) Z

1Ch RECEIVE DIAGNOSTIC RESULTS O

1Dh SEND DIAGNOSTIC O

39h COMPARE O

3Ah COPY AND VERIFY O

3Bh WRITE BUFFER Z3Ch READ BUFFER O

4Ch LOG SELECT O

4Dh LOG SENSE O

55h MODE SELECT(10) Z

5Ah MODE SENSE(10) Z

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 28/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 28

SCSI Status

•  Any time a SCSI Command

is sent to a Target

The Initiator expects a

completion Status

This status can reflect

successful or unsuccessful

completion of the command

• The Status may indicate

Busy or Not Ready

Error condition exists for

another command Targets task set is ful l

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 29/52

Page 29

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

Parallel SCSI

SCSI

 ApplicationSCSI

 Application

SCSI

 ApplicationSCSI

 Application

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

Interconnect

ServicesInterconnect

Services

Interconnect

ServicesInterconnect

Services

Command Set

Standards

SCSI-3

Parallel

Interface

SCSI-3

Parallel

Interface

SCSI Transport

Protocol

SCSI Application

Protocol

Protocol Service Interface

Interconnect Service Interface

Initiator Target

SCSI-3 Parallel Bus

P ll l SCSI Ch t i ti

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 30/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 30

Parallel SCSI Characteristics

• Half-duplex, daisy chained, shared bus, requires signaltermination

• Separate control and data signals

• Information can only go in one direction at a time

Each piece (byte) of information if acknowledged

Information transfers are interlocked

•  A connection protocol is used before any information transfers  Arbitration, Selection, and Message phases

Uses SCSI ID’s to identify devices

• Utilizes protocol “ bus” phases to accomplish information

transfers Command (CDB), Data, or Status

• Can multi-task by disconnecting

R d C d E l

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 31/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 31

Read Command Example

Initiator  Target

Connec t i on Ar bi t r at e and Selec t CDB 0x 2 8 00 00 10 00 00 00 0 A 00 00Command P hase

Reques ted Read In for

ma t ion

Da ta P hase

Comp le t ion In forma t ion 0 x00

S ta tus P hase

Reques ted Read In for

ma t ion

Da ta P hase

D isconnec t ion 0 x00

Message P hase

• Initiator connects to Target

Once Init iator connects to

Target, the Target is in control ofthe I/O Process

• Init iator sends CDB informationvia Command Phases

• Target returns requestedinformation via Data Phase

• Target returns completioninformation via Status Phase

• Target Disconnects via MessagePhase

Fib Ch l

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 32/52

Page 32

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

Fibre Channel

SCSI

 ApplicationSCSI

 Application

SCSI

 ApplicationSCSI

 Application

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

SCSI Transport

Protocol ServicesSCSI Transport

Protocol Services

Interconnect

ServicesInterconnect

Services

Interconnect

ServicesInterconnect

Services

Command Set

Standards

Fibre Channel

Protocol (FCP)

Fibre Channel)

SCSI Transport

Protocol

SCSI Application

Protocol

Protocol Service Interface

Interconnect Service Interface

Originator Responder 

Fibre Channel Serial Interface

FC Ch t i ti

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 33/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 33

FC Characteristics

• Full-duplex, bidirectional serial links 1 or 2 Gb/s now – 4 and 10Gb/s later 

Up to 10km l inks – some cases allow 100km

Interconnected via switches and/or hubs Switched fabric if switches are used

Hubs connect loop devices and requires arbitration

Typically referred to as a Storage Area Network (SAN)

• Requires login/logout procedures Process Login for SCSI Layer 

Fabric Login if switches are used

•  All information is transferred in packets (frames)

• SCSI CDB, Data, and Status information is wrapped in FibreChannel frames

• Utilizes Sessions, Exchanges, and Sequences

Fib Ch l Hi h

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 34/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 34

Fibre Channel HierarchySession

Frame 1

Sequence 1

Frame 2

Frame n

Exchange = I/O Process

Start ofFrame

4 bytes

Header 

24 bytes

Payload - up to 2112 bytes CRC

4 bytes

Optional Header 

64 Bytes

Standard Payload 

2048 Bytes

End ofFrame

4 bytes

Frame 1

Sequence 2

Frame 1

Sequence 3

Frame 2

Frame n

Frame 1

Sequence n

Frame 1

Last Sequence

Word bits 31 to 24 bits 23 to 16 bits 15 to 8 bits 7 to 0

0 R_CTL D_ID

1 Reserved S_ID

2 TYPE F_CTRL

3 SEQ_ID DF_CTL SEQ_CNT

4 OX_ID RX_ID

5 PARAMETER

Mandatory 6 words used to:

identif ies type of frame, where it

came from, where it’s going to,contents of payload, and other

Sequence and Exchange identifiers

FCP Characteristics

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 35/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 35

FCP Characteristics

• Session - no actual parallel SCSI equivalent

• Exchange = SCSI I/O Operation

• Sequence - no actual parallel SCSI equivalent

• FCP_CMD frame

Equivalent to parallel SCSI Command Phase

• FCP_XFER_RDY frame

No actual parallel SCSI Equivalent

• FCP_DATA frame

Equivalent to parallel SCSI Data Phase

• FCP_RSP frame

Equivalent to parallel SCSI Status Phase

SCSI Function FCP Equivalent

I/O Operation Exchange

Protocol Service Request and Response Sequence

Send SCSI Command Request Uns ol ici ted command IU (FCP_CMD)

Data delivery request Data descriptor IU (FCP_XFR_RDY)

Data delivery action Solicited data IU (FCP_DATA)

Send Command Complete Response Command s tatus IU (FCP_RSP)

REQ/ACK for Command Complete Confirmation IU (FCP_CONF)

FCP CMD frame

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 36/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 36

FCP_CMD frame

• The FCP_CMND frame is normally sent as a single-frame

sequence, which is the first sequence of an exchange.

• The FCP_CMND contains all the necessary information to

start the I/O Process.

Exec Mgmt CodesTask Mgmt FlagsTask Codesreserved 

Single Level LUN

Byte 3Byte 2Byte 1Byte 0

Byte 3 of CDBByte 2 of CDBByte 1 of CDBByte 0 of CDBByte 7 of CDBByte 6 of CDBByte 5 of CDBByte 4 of CDB

Byte 11 of CDBByte 10 of CDBByte 9 of CDBByte 8 of CDBByte 15 of CDBByte 14 of CDBByte 13 of CDBByte 12 of CDB

Data Length LSBData LengthData LengthData Length MSB

FCP_LUN0

FCP_CNTL

FCP_CDB

FCP_DL

1

34

56

2

7

Word 

SOF

4 bytes

Header 

24 bytes

Payload 

24 bytes

CRC

4 bytes

EOF

4 bytes

FCP XFER RDY frame

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 37/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 37

FCP_XFER_RDY frame

• FCP_XFER_RDY specifies the relative offset and length ofany following data sequence

• Optional for READ operations

• Required for WRITE operation

SOF

4 bytes

Header 

24 bytes

Payload 

12 bytes

CRC

4 bytes

EOF

4 bytes

reserved reserved reserved reserved 

lsbLENGTHBURSTmsb

lsbOFFSETRELATIVEmsb

Byte 3Byte 2Byte 1Byte 0

0

1

2

Word 

FCP DATA frame

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 38/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 38

FCP_DATA frame

•The Data Payload can be variable up to

2048 bytes in length.

SOF

4 bytes

Header 

24 bytes

Payload 

128 to 2048 bytes

CRC

4 bytes

EOF

4 bytes

FCP_DATA

128 to 2048 bytes

FCP_DATA

128 to 2048 bytes

FCP RSP frame

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 39/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 39

FCP_RSP frame

• The FCP_RSP frame defines the data structure containing the SCSI

status byte, SCSI autosense data, and the FCP response code.

• This frame signals the completion of a SCSI command or task

management function.

SOF

4 bytes

Header 

24 bytes

Payload 

Up to 256 bytes

CRC

4 bytes

EOF

4 bytes

SCSI Status byteValidity Flagsreserved reserved 

Byte 3Byte 2Byte 1Byte 0

LSBMSB LSBMSBLSBMSB

RSP_CODEreserved reserved reserved 

reserved reserved reserved reserved 

Reserved 0

FCP_STATUS

FCP_RESID

1

34

5

6

2

7

Word 

FCP_SNS_LEN

FCP_RSP_LEN

FCP_RSP_INFO

FCP_SNS_INFO......Byte 1 Sense DataByte 0 Sense Data

Byte n Sense Data.........

8

n

Write Command Example

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 40/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 40

Write Command Example

• Before devices cancommunicate in FC they mustestablish a session via loginprotocol

• Originator sends Writecommand to responder 

• Responder replies with a ready

to receive response• Originator sends Data frames

• When all Data is transferred,Responder sends Status to

Originator 

• Session could end at this pointbut typically doesn’t

Originator  Responder 

Establish Session(outside scope of this presentation)

F CP  _CMD F r ame ( W r i t e)Command P hase

FCP _  XFER _ RD Y Fram

e

(Responder  is read y  f

or Da ta )

FCP _ RSP FrameS ta tus P ha

se

F CP  _D AT  A F r ameDat a P hase

F CP  _D AT  A F r ameDat a P hase

Remove Session(outside scope of this presentation)

E x  c 

h   an  g e

 S  e  q u en c  e

iSCSI

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 41/52

Page 41

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.

iSCSI

IP

Network

IP

Network

FC SANFC SAN

iSCSI

GatewayInterconnect

ServicesInterconnect

Services

Data LinkData Link

IPIP

TCPTCP

Interconnect

ServicesInterconnect

Services

IP Network

Data LinkData Link

SCSI Application

SCSI

 Application

SCSI Application

SCSI

 Application

iSCSI Transport

Protocol ServicesiSCSI Transport

Protocol Services

iSCSI Transport

Protocol ServicesiSCSI Transport

Protocol Services

Command SetStandards

iSCSI

Protocol

Standard

Internet

Engineering

Task

Force

Standards

iSCSI Transport

Protocol

SCSI Application

Protocol

Protocol Service Interface

Interconnect Service Interface

Initiator Target

IPIP

TCPTCP

iSCSI Characteristics

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 42/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 42

iSCSI Characteristics

• iSCSI is a SCSI transport protocol for mapping of block oriented storagedata over TCP/IP networks.

• Storage generally identif ied for this application include disk, tape arraysand tape libraries.

• IP networks most applicable for this purpose are Gigabit Ethernet and inthe future 10 Gigabit Ethernet, however for low performance applications10/100bT will work.

• The iSCSI layer encapsulates the SCSI CDB into a iSCSI Protocol Data

Unit (PDU) and forwards i t to the Transmission Control Protocol (TCP)layer.

• The communications between the Init iator and Target will occur over oneor more TCP connections.

• The TCP connections form a session and will carry the iSCSI PDU’s. Thesessions are given an ID called a Connection ID (CID). There are two partsof the ID, Initiator Session ID (ISID) and Target ID (TSID) and togethermake up an “ I_T nexus” .

iSCSI Encapsulation

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 43/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 43

iSCSI Encapsulation

Data Data

Initiator Target

Data

InterconnectServices

Interconnect

Services

Data LinkData Link

IPIP

TCPTCP

InterconnectServicesInterconnectServices

Data LinkData Link

SCSI

 ApplicationSCSI

 Application

SCSI

 ApplicationSCSI

 Application

iSCSI Transport

Protocol ServicesiSCSI Transport

Protocol Services

iSCSI Transport

Protocol ServicesiSCSI Transport

Protocol ServicesiSCSI Transport

Protocol

SCSI Application

Protocol

Protocol Service Interface

Interconnect Service Interface

IP

PDU Header PDU Data

IP Network

IP

TCPTCP

Ethernet

Header  Ethernet Frame

IP

Header IP Packet (Datagrams)

      F C 

      S 

TCP

Header TCP Segment

      C       H      K

SCSI Command PDU

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 44/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 44

SCSI Command PDU

Byt e 0 Byt e 1 Byt e 2 Byt e 3

0 .|I| 0x01 F|R|W|. .| ATTR Reserved  

8+ Logical Unit Number (LUN)

16 Initiator Task Tag

48 AHS (if any) + Header-Digest (Optional)

+ DataSegment (Command Data)+ Data-Digest (Optional)

28 ExpStatSN

32+ SCSI Command Descriptor Block (CDB)

4 TotalAHSLength DataSegmentLength

20 Expected Data Transfer Length

24 CmdSN

Byt e 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

SCSI Response PDU

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 45/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 45

SCSI Response PDUByt e 0 Byt e 1 Byt e 2 Byt e 3

32 MaxCmdSN

36 ExpDataSN or Reserved  

40 Bi-directional Read Residual Count or Reserved 

Byt e 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

0

4

8+

16

20

24

28

44

48

+

. |. | 0x21 1|. . |o|u|O|U|. Response St at us

TotalAHSLength DataSegmentLength

Reserved 

Initiator Task Tag

SNACK Tag or Reserved 

StatSN

ExpCmdSN

Residual Count or Reserved 

Header-Digest (Optional)

Data Segment (Optional) + Data-Digest (Optional)

SCSI Data-out PDU

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 46/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 46

SCSI Data-out PDUByt e 0 Byt e 1 Byt e 2 Byt e 3

28 ExpStatSN32 Reserved  

40 Buffer Offset

Byt e 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

0

4

8+

16

20

24

36

44

48

+

. |. | 0x05 F| Reserved  

TotalAHSLength DataSegmentLength

LUN or Reserved 

Initiator Task Tag

Target Transfer Tag or 0xFFFFFFFF

Reserved 

DataSN

Reserved 

Header-Digest (Optional)

DataSegment + Data-Digest (Optional)

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 47/52

Ready To Transfer (R2T)

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 48/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 48

Ready To Transfer (R2T)

Byt e 0 Byt e 1 Byt e 2 Byt e 3

0 .|.| 0x31 1| Reserved  

16 Initiator Task Tag

28 ExpCmdSN

32 MaxCmdSN

36 R2TSN

48 Header-Digest (Optional)

40 Buffer Offset

44 Desired Data Transfer Length

4 TotalAHSLength DataSegmentLength

8+ LUN

20 Target Task Tag

24 StatSN

Byt e 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

Write Command Example

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 49/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 49

Write Command Example

• Before devices cancommunicate in iSCSI theymust establish a session vialogin protocol

• Initiator sends Writecommand to Target

• Target replies with a ready to

transmit R2T response• Initiator sends Data frames

• When all Data is transferred,Target sends Status to

Initiator

• Session could end at thispoint but typically doesn’t

Initiator  Target

Establish Session(outside scope of this presentation)

Command P DU ( W r i t e)Command P hase

R 2 T PDU

( Targe t  is read y  for D

a ta )

Response PDU

S ta tus P hase

Dat a-Out  P DUDat a P hase

Dat a-Out  P DUDat a P hase

Remove Session(outside scope of this presentation)

 S  e  q u en c  e

Read Command Example

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 50/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 50

Read Command Example

• Before devices cancommunicate in iSCSI theymust establish a session via

login protocol

• Initiator sends Read commandto Target

Target sends Data frames• When all Data is transferred,

Target sends Status to Initiator

• Session could end at this point

but typically doesn’t

Initiator  Target

Establish Session(outside scope of this presentation)

Command P DU ( Read)Command P hase

Response PDU

S ta tus P hase

Da ta-In PDU

Da ta P hase

Da ta-In PDU

Da ta P hase

Remove Session(outside scope of this presentation)

 S  e  q u en c  e

Summary

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 51/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 51

y

• SCSI is the language of LOVE

• Every storage architecture utilizes the SCSI model

SCSI Commands sets are available for every type of storage deviceeven including host-to-host

•  An I/O Process is interface independent and is made up of:

Command Phase

Optional Data Phase and a Status Phase

• SCSI language is here to stay and will be integrated in everystorage architecture

• For more information on standards see: incits.org, t10.org, t11.org,t13.org, ietf.org, scsita.org, fibrechannel.org

Credit Slide

8/13/2019 SCSI- The Protocol for All Storage Architectures

http://slidepdf.com/reader/full/scsi-the-protocol-for-all-storage-architectures 52/52

SCSI – The Protocol for All Storage Archi tectures

Copyright 2003 Storage Networking Industry Association. All Rights Reserved.Page 52

• Please send any questions or comments on this presentation to: snia-

[email protected]

• Many thanks to the following SNIA members for their contributions tothis tutorial:

Developer: David Deming, Solution Technology, [email protected]

Reviewers:

Rob Elliott, HP, [email protected]

LeRoy Budnik, Knowledge Transfer, [email protected]

Charles Curtis, HP, [email protected]

 Antolin Agatep, Xilinx, [email protected]