SCSI Commands


A device must implement these commands to be compliance with the SPC-2 standards.

All devices i.e random, sequential, optical etc shall implement the following 4 commands in same manner.

1) TUR
2) REQUEST SENSE
3) INQUIRY
4) SEND DIAGNOSTIC

For DAD ---                      1) SEEK                     2) READ & WRITE                                                                                              3) READ CAPACITY

For Device Reservation:   1) RESERVE             2) RELEASE

Operating modes:             1) MODE SENSE      2) MODE SELELCT


Data Mode

Example Commands

Neither I/P nor O/P data

TUR

No I/P data, O/P data

INQUIRY, READ

I/P data, No O/P data

MODE SELECT, WRITE

I/P data, O/P data

MODE SENSE


TEST  UNIT  READ (Op-code 00h)
  • This command allows a application client to poll a LU until it is ready without the need to allocate space for returned data.
  • Device server shall respond promptly to indicate the current status of the device(delays to achieve good status is not advisable) 
  • Status response expected from TUR command is GOOD or CHECK CONDITION.
INQUIRY
  • This command requests that information regarding parameters of the target and component LU be sent to the application client.
  • SCSI device shall respond with information that includes their type and standard level & vendor identification, model number and other useful information. Unit Attention is reported on all commands except INQURY command. Inquiry cmd shall return check condition status only when the device server cannot return the requested inquiry data. If an Inquiry cmd is received from an I with pending unit attention condition, the device server shall perform the Inquiry cmd and shall not clear the unit attention condition.
READ CAPACITY
  • Fetches the no of blocks (and block size) from the device.
  • The SCSI READ CAPACITY command actually yield the block address of the last block and block size. No of blocks is this one plus the block address of the last block.

Comments

  1. Let's say that I have a target that can support multiple LUNs but currently has no peripheral devices provisioned. Must my target respond to the 4 commands that you list above plus REPORT LUNS with a default dummy LUN 0?

    Later on I configure a device and assign LUN 2 to it. Must my target continue to support dummy LUN 0 for INQUIRY etc. (I know RL must be supported for LUN 0 always)?

    Additionally is there any problem with assigning the first device to a LUN other than 0? Must devices be assigned in order starting at LUN 0?

    Finally I configure a device and assign LUN 0 to it thereby overloading LUN 0. What are the implications of this real device masking the dummy LUN 0?

    Also, will an initiator have problems with my skipping LUN 1?

    ReplyDelete

Post a Comment

Popular Posts