Friday 27 April 2012



                                                                          SCSI
What is SCSI?
Small Computer System Interface.
Introduced by ANSI in 1986.
An I/O bus interconnecting  computers and peripheral devices.
Why  SCSI?
Industry standard interface.
Generic interface for different  devices from different vendors.
Easy addition of new SCSI  devices.
Allows for faster data input and  output.
Ability to process multiple overlapped commands.
Various  SCSI standards .
Initial version as SCSI-1 .
Introduced in 1986.
Defined the basics of SCSI Bus.
Talked about cable length, signaling  characteristics.
Defined various Commands and  Transfer modes.

Revised and upgraded to SCSI-2 .
Approved in 1990.
Defined the new features as  enhancements to SCSI-1.
Incorporated the backward  compatibility with SCSI-1.
Recent version is SCSI-3
Much more features added to SCSI- 2.
SCSI-1
Defined the basic 8 bit data bus.
Maximum transfer speed was  limited to 5 MB/s.
Had difficulties in acceptance, as  many vendors implemented only  subsets of this protocol.
SCSI-2
Introduced Fast  SCSI
Doubling of the speed of data  transfer to 10MB/s with regular  SCSI.
Introduced Wide SCSI
Increasing the width of the SCSI bus  from 8 bits to 16/32 bits.
This increases the data throughput of  the devices.

More number of devices per bus
On buses with Wide SCSI, 16  devices are supported, as opposed to  8 for regular SCSI.
Improved cables and connections
Incorporated new higher density  connections.
Active termination which provided  the reliable termination of the bus.

Command queuing
Introduced the concept of having  multiple outstanding requests on the  bus at any point of time.
Additional command sets
Included new command sets to  support the use of more devices like  CD-ROMs, scanners and removable  media. SCSI-1 focussed more on  supporting hard disks.
Command set enhancements
SCSI-3
Ultra SCSI
Further doubling of system bus speed  resulting in data transfer rates up to  20MB/s for regular and 40MB/s for  Wide SCSI.
Serial SCSI
Uses Serial SCSI as one of its new  protocol standards (also called  FireWire).
Improved Cabling
Improvements over SCSI-2 for tuhe  use of Wide SCSI.
SCSI - Electrical Signal  types
Single Ended
Conventional signaling as used on  other buses.
A positive voltage indicates a logical  TRUE and no voltage FALSE.
Each signal is carried on one wire.
Flexible and cost effective, as is very  common.
Cable length, however, is highly  limited due to the effect of noise.
Differential
Uses differential signaling.
Each signal is carried by two wires,  each the mirror image of the other.
A positive voltage on one wire and  an equal negative voltage on the  other indicates a TRUE.
Zero voltage(electrical ground) on  both the wires indicates a FALSE.
Use of two conductors makes this  scheme more resilient and immune to  electrical noise.
Longer cable lengths possible.
Cost is much more higher than single  ended.
Back to the technical  jargon!!
Two different classifications
SPEED
BUS WIDTH
Speed of SCSI Bus
Regular
5MB/s data transfer rate.
Fast
10MB/s data transfer rate.
Ultra
20MB/s data transfer rate.
Bus width of SCSI Bus
Narrow
8 bit wide data bus.
Wide
16 bit wide data bus.
All in a nutshell
SCSI ID
Unique identification number  assigned to each device on the bus.
Used to identify devices on the  bus.
For Narrow SCSI, ID ranges from  0 to 7.
For Wide SCSI, ID ranges from 0  to 15.
ID determines the priority of the  device during arbitration.
Larger the ID, higher the priority.
Generally the host adapter is at ID  7 (highest priority).

Termination
Mandatory for SCSI devices.
Used to prevent signal reflections  from entering the SCSI bus.
Provided by using a terminator.

SCSI Bus
Communication on the SCSI bus is  allowed between only two SCSI  devices at any given time.
Of the two devices on the SCSI  bus, one acts as the initiator and  the other as target.
Initiator originates an operation.
Target performs the operation.
A device usually has a fixed role  as an initiator or target Some  devices can assume either role.
Certain SCSI bus functions are  assigned to the initiator and certain  to the target.
Data transfer takes place through  the mechanism of handshaking  signals.
SCSI Bus Signals
Total of 47 signals.
11 signals for control, 36 for data.
Important signals:
BSY - Bus being used.
SEL - Used by initiator/target to  select/reselect a target/initiator.
C/D - Control or Data information on  the bus.
I/O - Indicates the direction of data  transfer w.r.t the initiator.
MSG - Used during message phase.
REQ/ACK – Handshaking signals.
REQ –  request for an ACK  handshake
ACK- acknowledgement of a REQ.
DB - Data bus.
ATN- signal driven by an initiator  to indicate to a target that the  initiator has a message ready.
RST – Reset condition
SCSI Bus Phases
SCSI Architecture has 8 distinct  phases.
BUS FREE Phase.
ARBITRATION Phase.
SELECTION Phase.
RESELECTION Phase.
COMMAND Phase.
DATA Phase.
STATUS Phase.
MESSAGE Phase.
BUS FREE Phase
Indicates that there is no current  I/O process on the bus.
SCSI bus is available for  connection.
Devices detect this phase after the  BSY and SEL signals are both  false.
Generally this phase is entered,  when a target releases its BSY  signal.
ARBITRATION Phase
Allows one SCSI device to gain  control of the SCSI bus to initiate  or resume an I/O process.
Following steps occur while a  SCSI device gains control of the  SCSI bus:
Device waits for the BUS FREE  phase to occur.
After the Bus Free phase occurs, the  device waits for a specified amount  of time before driving any signal.
Device then arbitrates for the SCSI  bus by asserting the BSY signal and  its  own SCSI ID bit on the data bus.
Device waits for an arbitration delay,  before examining the data bus.
If a higher priority SCSI ID bit is  found on the data bus, the device has  lost its arbitration and releases the  BSY signal and returns to step 1.
Else, the device has won the  arbitration. It then asserts the SEL  signal.
SELECTION Phase.
Allows an initiator to select a  target to carryout target functions  (READ, WRITE).
I/O signal is negated during this  phase to differentiate it from  RESELECTION phase.
Selection is done by the following  mechanism:
Initiator sets the data bus to a value  that is the OR of its SCSI ID and the  target SCSI ID bit.
It then asserts the ATN signal  indicating a MESSAGE OUT Phase  is to follow.
Then the initiator releases the BSY  signal.
The target shall determine that it is  selected when the SEL and its SCSI  ID are high and BSY and I/O lines  are low.
It then scans the data bus to find the  initiator and asserts the BSY signal.
If more than two SCSI ID bits are on  the data bus, the target shall not  respond to selection.
RESELECTION Phase
Optional Phase
Allows a target to reconnect to an  initiator to continue some I/O  operation that was previously  started by the initiator and  suspended by the target.
Reselection follows the  mechanism stated below:
After Arbitration phase, the winning  device asserts the BSY and SEL  lines.
The winning SCSI device becomes a  target by asserting the I/O signal.
It then puts its SCSI ID on the data  bus OR ed with the ID of the  initiator.
The device then releases the BSY  signal.
The initiator, on seeing its ID on the  data bus along with SEL and I/O  being true and BSY being false,  determines that it is reselected.
It then finds the target by  scanning  the data bus.
The reselected initiator shall then  assert the BSY signal.
After the target finds that BSY signal  is asserted, it releases the SEL signal.
Upon this, the initiator releases the  BSY signal and the target asserts the  same.
The I/O then continues normally  until the target drops the SEL signal.
INFORMATION  TRANSFER Phases
Consists of the Command, Data,  Status and Message Phases.
C/D, I/O, MSG signals are used to  distinguish between the different  phases.
The information transfer phases  use one or more REQ/ACK  handshake signals to control the  information transfer.
During the information transfer  phases, the BSY signal shall be  True and the SEL signal, False.
Two modes of information  transfer.
Asynchronous Information Transfer.
Synchronous Information Transfer.
Asynchronous Information  Transfer
Target controls the direction of  data transfer through the I/O  signal.
I/O signal true indicates data  transfer from target to the initiator.
If I/O is true, target puts data on  the data bus, asserts REQ signal.
Target puts data on the data bus and  drives the REQ signal to true.
Initiator reads the data when it finds  the REQ signal true, then asserts the  ACK signal.
When ACK is true, target may  change the data on the data bus and  then release REQ.
When REQ becomes false, initiator  releases the ACK signal.
After this, the target then can either  continue the data transfer or stop it.
I/O signal false indicates data  transfer from initiator to the target
Initiator requests for data transfer by  asserting the REQ signal.
Initiator puts the data when it finds  the REQ signal true, then asserts the  ACK signal.
Target reads the data when it finds  the ACK signal true, then negates the  REQ signal.
When REQ is false, initiator may  change the data on the data bus and  then negate ACK.
After this, the target then can either  continue the request for data transfer  or stop it.
Synchronous Information  Transfer.
Used generally for Data Transfer  Phase.
Used only if a prior agreement is  reached using messaging phases.
The offset for REQ/ACK signals is  also reached upon then.
Offset specifies the number of  REQ signals the target sends in  advance of the number of ACK  signals received from the initiator.
For each REQ signal, one byte of  data is transferred and an ACK  pulse is sent.
Different phases during  Information Transfer
Command Phase
Allows the target to request  command information from the  initiator.
Data Phase
DATA IN - Allows the target to  request that data be sent to the  initiator from the target.
DATA OUT - Allows the target to  request that data be sent to the target  from the initiator.
Status Phase
Allows the target to request that  status information be sent to the  initiator from the target.
Message Phase
MESSAGE IN - Allows the target to  request that messages be sent to the  initiator from the target.
MESSAGE OUT - Allows the target  to request that messages be sent to  the target from the initiator.
Target invokes Message Out phase in  response to the Attention condition  from the initiator by ATN signal.
SCSI Bus Conditions.
Two conditions, which can cause  the SCSI device to perform certain  actions and alter the phase  sequence.
Attention Condition - Allows the  initiator to inform the target that it  has a message ready. Target reads it  by performing a Message Out Phase.
Reset Condition - Immediately clears  all SCSI devices from the bus. This  condition takes precedence over all  the other phases on the bus.
SCSI bus phase sequences.
Brief description about  messages
Allows communication between  target and initiator for interface  management.
Messages may be of one, two or  multiple bytes in length.
One or more messages may be sent  during a single MESSAGE Phase.
Some of the generally used  messages:
Abort - Sent from initiator to target  for clearing any I/O process.
Command Complete - Sent from  target to initiator to indicate the  completion of an I/O process and that  valid status has been sent to the  initiator.
Disconnect - Sent from T to I  indicating that the present connection  is being broken and will be later  resumed by invoking the  RESELECTION phase.
SCSI Commands
SCSI Commands follow the  pattern of the Command  Descriptor Block (CDB) to the  target.
First byte in any SCSI Command  should contain the valid opcode.
Opcodes are classified into  Optional, Mandatory and Vendor  specific.
Some fields in the CDB are  reserved and are set to zero.
If a target receives a CDB with the  reserved fields not being set to  zero, shall terminate the command  with a CHECK CONDITION  status.
Three groups – 0- 6 byte
                            1,2 -10 byte
                            5- 12 byte
3 and 4 reserved . 6 and 7 are  vendor specific.

Format of a 6-byte CDB

The transfer length field specifies  the amount of data to be  transferred, usually the number of  blocks.
Commands that use one byte for  the transfer length allow up to 256  blocks of data to be transferred by  one command.
SCSI Status
Shall be sent from the target to the  initiator during the STATUS Phase  at the completion of each  command.
General status conditions:
Good - Target successfully  completed the command.
Check condition - Indicates that  contingent allegiance occurred.
Busy - Indicates that target is busy.

Command Terminated - Returned  whenever the target terminates the  I/O process.
SCSI Commands
  Test unit ready : Queries device  to see if it is ready for data  transfers (disk spun up, media  loaded, etc.). Opcode = 0x00
   Inquiry : To obtain basic  information from a target device.  Opcode =12h
  Request sense : Returns any error  codes from the previous command  that returned an error status. 3h.

Send diagnostic  :requests the  target to perform a self test. Test is  standardized and response is  GOOD if all is well or CHECK  CONDITION status if test fails.  1Dh
Start/Stop unit : Spins disks up  and down, load/unload media. 1Bh
Read capacity : Returns storage  capacity. 25h

Format unit : Sets all sectors to all  zeroes, also allocates logical  blocks avoiding defective sectors.
ftp  Read  (four variants): Reads data  from a device.
 Write  (four variants): Writes data  to a device.

 Log sense : Returns current  information from log pages.
 Mode sense : Returns current  device parameters from mode  pages.
 Mode select : Sets device  parameters in a mode page.





What is Data ?

Data is a collection of raw facts from which conclusions may be drawn.Handwritten letters, a printed book, a family photograph, a movie on video tape, printed and duly signed copies of mortgage papers, a bank’s ledgers, and an account holder’s passbooks are all examples of data.Today, the same data can be converted into more convenient forms such as an
e‑mail message, an e-book, a bitmapped image, or a digital movie. This data can be generated using a computer and stored in strings of 0s and 1s, as shown in Figure




Types Of Data:

Data can be classified as structured or unstructured based on how it is stored and managed. Structured data is organized in rows and columns in a rigidly defined format so that applications can retrieve and process it efficiently. Structured data is typically stored using a database management system (DBMS).Data is unstructured if its elements cannot be stored in rows and columns,and is therefore difficult to query and retrieve by business applications. For example, customer contacts may be stored in various forms such as sticky notes, e-mail messages, business cards, or even digital format files such as .doc, .txt,
and .pdf. Due its unstructured nature, it is difficult to retrieve using a customer relationship management   application. Unstructured data may not have the required components to identify itself uniquely for any type of processing or     interpretation. Businesses are primarily concerned with managing unstructured data because over 80 percent of enterprise data is unstructured and requires significant storage space and effort to manage.





What is Storage?

Data created by individuals or businesses must be stored so that it is easily accessible for further processing. In a computing environment, devices designed for storing data are termed storage devices or simply storage. The type of storage used varies based on the type of data and the rate at which it is created and used. Devices such as  memory in a cell phone or digital camera, DVDs, CD-ROMs, and hard disks in personal computers are examples of storage devices. Businesses have several options available for storing data including internal hard disks, external disk arrays and tapes.

Evolution of Storage Technology and Architecture

Organizations had centralized computers (mainframe) and information storage devices (tape reels and disk packs) in their data center. The evolution of open systems and the affordability and ease of deployment that they offer made it possible for business units/departments to have their own servers and storage. In earlier implementations of open systems, the storage was typically internal to the server.
Redundant Array of Independent Disks (RAID): This technology was developed to address the cost, performance, and availability requirements of data. It continues to evolve today and is used in all storage architectures such as DAS, SAN, and so on.
Direct-attached storage (DAS): This type of storage connects directly to a server (host) or a group of servers in a cluster. Storage can be either internal or external to the server. External DAS alleviated the challenges of limited internal storage capacity.
Storage area network (SAN): This is a dedicated, high-performance Fibre Channel (FC) network to facilitate block-level communication between servers and storage. Storage is partitioned and assigned to a server for accessing its data. SAN offers scalability, availability, performance, and cost benefits compared to DAS.

Network-attached storage (NAS): This is dedicated storage for file serving applications. Unlike a SAN, it connects to an existing communication network (LAN) and provides file access to heterogeneous clients. Because it is purposely built for providing storage to file server applications, it offers higher scalability, availability, performance, and cost benefits compared
to general purpose file servers.

Internet Protocol SAN (IP-SAN): One of the latest evolutions in storage architecture, IP-SAN is a convergence of technologies used in SAN and NAS. IP-SAN provides block-level communication across a local or wide area network (LAN or WAN), resulting in greater consolidation and availability of data.



What is Data Center ?

Organizations maintain data centers to provide centralized data processing capabilities across the enterprise. Data centers store and manage large amounts of mission-critical data. The data center infrastructure includes computers, storage systems, network devices, dedicated power backups, and environmental controls (such as air conditioning and fire suppression).
Large organizations often maintain more than one data center to distribute data processing workloads and provide backups in the event of a disaster. The storage requirements of a data center are met by a combination of various storage architectures.

Application: An application is a computer program that provides the logic for computing operations. Applications, such as an order processing system, can be layered on a database, which in turn uses operating system services to perform read/write operations to storage devices.

Database: More commonly, a database management system (DBMS) provides a structured way to store data in logically organized tables that are interrelated. A DBMS optimizes the storage and retrieval of data.

Server and operating system: A computing platform that runs applications and databases.

Network: A data path that facilitates communication between clients and servers or between servers and storage.

Storage array: A device that stores data persistently for subsequent use.  These core elements are typically viewed and managed as separate entities, but all the elements must work together to address data processing requirements.



Dear Readers,


I am going to write on Storage networks and This course is targeted towards developers, integrators, managers and others with a need for a comprehensive, in-depth understanding of the Storage technology.An understanding of current computer interfaces or networks is desirable, although not absolutely necessary.






Storage networks course:


  1. Introduction to Storage

  1. Storage Topologies

  1. Interface Protocols

  1. RAID

  1. Network Attached Storage

  1. Fibre Channel protocol

  1. Storage Area Networks

  1. IP SAN –ISCSI

  1. Business continuity with Backup and replication

  1. Introduction to File system

  1. Era of Virtualization

  1. Data Deduplication