WP CI FundamentalsofSCSI1

  • Upload
    sag005

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

  • 8/13/2019 WP CI FundamentalsofSCSI1

    1/12

    Expert Reference Series of White Papers

    1-800-COURSES www.globalknowledge.com

    Fundamentals ofSCSI and iSCSI

  • 8/13/2019 WP CI FundamentalsofSCSI1

    2/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 2

    Fundamentals of SCSI and iSCSIRaymond B. Dooley, Global Knowledge Instructor, CCSI, CCNP, CCDP

    IntroductionThe computer world is full of buses. Most people are familiar with the universal serial bus (USB), which worksfine for storing photos, and music files, but it is not big enough to support the types of file and data retrievalfunctions needed in a corporate data center. To support the retrieval of stored data from a disk, group of disks,optic memory array, or tape drives, another type of bus and protocol is required.

    Small Computer Systems Interface (SCSI) was originally a proprietary design by Shugart Associates in the 1970s.In 1986 the SCSI (pronounced scuzzy) standard was released by the American National Standards Institute(ANSI), and since then it has evolved through SCSI-1 and SCSI-2, to the current SCSI-3. This white paper willfocus on:

    Protocol Overview and Role

    Parallel Bus Technology

    Architecture Model

    SCSI over Fibre Channel

    SCSI Operations

    Commands and Messages

    Building an I/O Request

    Internet SCSI (iSCSI)

  • 8/13/2019 WP CI FundamentalsofSCSI1

    3/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 3

    SCSI Protocol Overview and Role

    Figure 1.

    SCSI defines the relationship between initiators (hosts) and targets (disk or tape). The SCSI-3 application residesin the host and provides middle-layer OSI Model (session and transport) services for upper layer le manage-ment protocols. Several components and options are defined:

    TheSoftware initiatoruses code in the OS (kernel-resident device driver) which uses the existing infra-structure. This is the most common type.

    The Hardware initiatoruses dedicated hardware, typically in combination with firmware running on thehardware to implement SCSI. The hardware is the Host Bus Adapter (HBA), and is more common for serversin data centers.

    SCSI targets include the following:

    A single disk

    Just a Bunch of Disks (JBOD)

    RAID - Redundant Array of Independent Disks

    Tape Storage

    Optic Memory

  • 8/13/2019 WP CI FundamentalsofSCSI1

    4/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 4

    Each individual disk is identified in SCSI as aLogical Unit Number (LUN). SCSI is fast (320 Megabytes persecond), but limited to 25 meters of cable.

    Parallel Bus Technology

    The SCSI parallel bus is either narrow (8 bits) or wide (16 bits), with wide used more often in modern systems.Data is sent simultaneously over multiple wires (in parallel, see Figure 2 below).

    Figure 2

    SCSI ishalf-duplexmeaning data travels in one direction at a time, and only one device can control the bus atone time. A device must assume exclusive control over the bus in order to communicate. Another name for thisis simplexcommunication (Like a Western Union telegram).

    The SCSI initiator selects the SCSI target and sends a command to initiate data transfer. At the end of the

    transfer, the bus is deselected and the bus is free.

    Data bits and control bits are sent on separate wires; this is called out of band control.

    Each SCSI device has a unique Identier (ID). The initiator is always ID = 7, which is the highest priority. In aSCSI target, in addition to the ID, a LUN then identies the specic target disk. The process requires an exchangeof commands to and from the two addresses, then the transfer of data.

    SCSI-3 Architecture Model

    Figure 3 represents the SCSI-3 architecture model. The model consists of four layers of functionality (from thebottom of the graphic working up, with number one at the bottom of the graphic and number four at the top).

  • 8/13/2019 WP CI FundamentalsofSCSI1

    5/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 5

    Figure 3.

    The physical interconnect layer defines the characteristics of the link between initiator and target.

    FC is bre channel

    Serial Storage Architecture (SSA) is common in data centers where scalability is an issue

    IEEE 1394 is the Firewire specication

    SCSI Parallel Interface (SPI) is in every PC (on the far left side of the graphic)

    The transport protocol layer defines session management, which is techno-speak for the rules of the conversa-tion.

    SCSI-FCP for bre channel

    Serial Storage Protocol (SSP) for SAS devices

    Serial Bus Protocol (SBP) for IEEE 1394

    The shared command set layer consists of command sets for accessing storage resources (disk arrays, optic ar-rays, etc.).

    The SCSI Common Access Method (CAM) denes the SCSI drive application programming interface (API). APIsare used by application program developers to insure that the application written has proper access to storage.

  • 8/13/2019 WP CI FundamentalsofSCSI1

    6/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 6

    In a medium-to-large enterprise data center, there will be a fibre channel fabric. The SCSI initiator and target willcommunicate over this fabric. SCSI commands, data, and responses are carried in the payload of fibre channelframes. Fibre channel can be described as a very fast pipe, which never loses any data or becomes congested,that provides a conduit for the SCSI commands and traffic.

    In SCSI-FCP, the SCSI IDs are mapped to the unique worldwide name in each Fibre Channel port. This is whatmakes the pipe work.

    SCSI OperationsSCSI specifies three phases of operation:

    1. Phase One is the Command Phase. In this phase the required commands and parameters are sent.

    2. Phase Two is the Data Phase. The transfer of data in accordance with the command occurs in this phase.

    3. Phase Three is the Response Phase. Conrmation of command execution is received in this phase.

    Figure 4.

    Each SCSI command is formatted as a Command Descriptor Block (CDB). The majority of the SCSI protocol iscontrolled by the initiator, while the target is passive and waits for a command. Only the initiator can initiate aSCSI operation by selecting a SCSI target and sending a CDB to it.

    If the CDB contains a Readcommand, the SCSI target moves its heads into position and retrieves the data fromdisk sectors. If the CDB contains a Writecommand, the SCSI target prepares its buffers and returns an indica-tion of ready. When the initiator receives the ready, the data is written to disk.

  • 8/13/2019 WP CI FundamentalsofSCSI1

    7/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 7

    When the operation is complete, the SCSI target returns a response to indicate a successful, or unsuccessful,data transfer.

    SCSI Commands

    SCSI supports several specific commands for each media type, and primary commands that all devices under-stand.

    The Session Layer (OSI layer 5) protocols are complex and require more command-level functionality than anyother layer, with the possible exception of layer 7 (Application).

    Since SCSI performs session layer functions for data storage and retrieval, it is also complex. Table 1 shows afew of the many available commands, formatted as CDBs:

    Command Function

    Inquiry

    Report LUNs

    Test unit ready

    Report capacity

    Write buffer

    Read buffer

    What device are you?

    How many LUNs do you have?

    Is the LUN available?

    What size is each LUN?

    Write data to target LUN.

    Read data from target LUN.

    Table 1.

    SCSI Messages are an additional way for the initiator and target to communicate. Some SCSI transmissionparameters are not tied to a specific command but to the initiator-target relationship. Several parameters,including transfer speed, data width, abort, and restore pointers, are established between initiator and target tomaintain accurate information exchange.

    Building an I/O RequestFigure 5, below, provides an example of an initiator talking to a target.

  • 8/13/2019 WP CI FundamentalsofSCSI1

    8/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 8

    Figure 5.

    The process breaks down into the following steps:

    1. The application makes a le I/O request to Volume Manager2. Volume Manager maps volume to SCSI ID and target LUN

    3. File System maps les to blocks, makes block I/O request

    4. Command, LBA (Logical Block Address), block count, and LUN sent to SCSI driver

    5. SCSI driver creates CDB

    6. FC (Fibre Channel) driver creates command frame with CDB in payload

    7. FC driver sends command frame to target LUN and awaits response

    As errors may occur in this process, theSCSI Retrycommand causes the entire operation to be repeated.

    Internet SCSI (iSCSI)SCSI specifications limit data transfer distance to 25 meters, but many data center design parameters requiremore distance between devices. iSCSI (Internet SCSI) allows initiator and target to exchange SCSI commands

  • 8/13/2019 WP CI FundamentalsofSCSI1

    9/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 9

    using IP networks over TCP ports 860 and 3260. Since iSCSI requires no dedicated cabling (bre channel) it isoften viewed as a low-cost alternative to fibre channel (see Table 2 on page 11 for other comparison points).

    Figure 6.

    There are two major applications for iSCSI:

    1. Storage Consolidation - Organizations move disparate storage resources from servers around theirnetwork to central locations (data centers). This allows for more efficiency in the allocation of storage.

    2. Disaster Recovery - Organizations mirror storage resources from one data center to a remote datacenter, which can serve as a hot standby in the event of a prolonged outage. iSCSI SANs allow entire

    disk arrays to be migrated across a WAN with minimal configuration changes, in effect, making storageroutablein the same manner as network traffic.

    Figure 7

    An interface from the SCSI device to the iSCSI world (network) is required. The simplest of these is the standardNIC (Network Interface Card). However, as volumes increase, the TCP/IP processing across the interface will

    overload the host.

    Another option is to build TCP/IP processing on the NIC, called a TCP Ofoad Engine (TOE). A TOE can beinstalled as partial ofoad (everything but error recovery) or full ofoad. To achieve maximum performance, theiSCSI HBA (Host Bus Adapter) is used.

  • 8/13/2019 WP CI FundamentalsofSCSI1

    10/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 10

    Figure 8.

    SCSI standards define a client server relationship between the initiator and target. iSCSI defines these as theNetwork Entity.

    The network entity contains an iSCSI node (either initiator or target), which is identified by an iSCSI node name.There are three formats:

    1. iSCSI Qualified Name (IQN) - It is a month and year date followed by a reverse domain name.(2010-04.com.acme:storage.tape.sys1.xyz)

    2. IEEE Extended Unique Identifier (EUI) - 64 bits

    3. T11 Network Address Authority (NAA) - 64 or 128 bits

    IQN names are the most commonly used. If the target node is a storage array, it can contain one or more SCSILUNs.

    iSCSI initiator nodes communicate with iSCSI target nodes through network portals, identied by IP address.Network portals can be wireless ports.

    Table 2 provides a quick comparison of fibre channel and iSCSI as a SAN solution. What it does not show is thatbre channel can also run over IP (FCIP), which makes the choices even more challenging. One of the majordisadvantages of iSCSI in the data center is meeting the scalability and performance required in high-volumeenvironments.

  • 8/13/2019 WP CI FundamentalsofSCSI1

    11/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 11

    Fibre Channel iSCSI

    Designed for enterprise markets Designed for SMB markets

    High bandwidth of 1 Gbps, 2 Gbps, 4 Gbps Low bandwidth of 1 GigabitEthernet, 10 Giga-bitEthernet

    Low latency of 2 msec per port High latency; IP has msec latency

    Large payload of up to 2112 bytes Smaller payload of up to 1500 bytes; up to 9000bytes using jumbo frames

    Low overheads of 5.5% for 1KB payload, 3% for2KB payload

    Higher overheads of 8% for 1KB payload

    Short distance of 10 km per link for single modefiber

    Long distance; no theoretical limit over IP net-works, but high latency

    High cost HBAs and switch ports Low cost: use existing NiC and LAN; iSCSI HBAsare expensive

    Table 2

    Another issue with all SAN solutions is network security. iSCSI supports authentication with CHAP (ChallengeHandshake Authentication Protocol) but it must be properly implemented to avoid known vulnerabilities.

    Also, iSCSI is sent in clear text, and while IPSec may be used for encryption, it has presented problems whenused with iSCSI. Server Message Encryption (SME) can be used in non-SCSI environments.

    SummaryTo recap, SCSI is present in all personal computers and has been a standard for file storage and retrieval formany years. It denes an initiator/target client/server relationship which includes addresses, commands, and

    specified operations.

    The SCSI model includes numerous interfaces including TCP/IP, bre channel, directly attached parallel bus, andrewire. The many SCSI commands are formatted as CDBs. Fibre Channel and iSCSI are the two major choicesfor building out SCSI over a network. Both are present in modern data centers.

    Learn MoreLearn more about how you can improve productivity, enhance efficiency, and sharpen your competitive edgethrough training.

    Data Center Network infrastructure Design v2.0 (DCNID)

    Designing Cisco Storage Networking Solutions 4.2.1 (DCSNS)

    Visitwww.globalknowledge.com or call 1-800-COURSES (1-800-268-7737)to speak with a Global Knowl-edge training advisor.

    http://www.globalknowledge.com/training/course.asp?pageid=9&courseid=12070&catid=495&country=United+Stateshttp://www.globalknowledge.com/training/course.asp?pageid=9&courseid=12440&catid=495&country=United+Stateshttp://%20www.globalknowledge.com/http://%20www.globalknowledge.com/http://%20www.globalknowledge.com/http://www.globalknowledge.com/training/course.asp?pageid=9&courseid=12440&catid=495&country=United+Stateshttp://www.globalknowledge.com/training/course.asp?pageid=9&courseid=12070&catid=495&country=United+States
  • 8/13/2019 WP CI FundamentalsofSCSI1

    12/12

    Copyright 2011 Global Knowledge Training LLC. All rights reserved. 12

    About the AuthorRay Dooley is a co-founder and CEO of ICM in Redmond, WA. He has been a Global Knowledge instructor since1994 and teaches the entire CCNP curriculum, plus advanced classes in MPLS, BGP, ATM, and Cisco Trouble -shooting. He has recently become involved in data center and storage network design.