Skip to content

SCSI Commands

REQUEST SENSE

The response for REQUEST_SENSE includes the following data fields:

PHYSICAL WRAP (byte 29): The physical wrap of the current location. If the value in this field is FFh, then the logical wrap number exceeds 254. Physical direction is not reflected in this case.

The least significant bit reflects the current physical direction.

Value Description
0b the current direction is away from physical beginning of tape.
1b the current direction is towards physical beginning of tape.

Further clarifications from Kevin Butt (Tape Firmware, IBM):

I believe LTO-8 has 208 physical wraps. How many wraps will there be in LTO-9 media? If there are more than 254, how will the wrap information be encoded in the reply?

LTO-8 12TB has 208 physical wraps. LTO-9 18TB has 280 wraps. Since this exceeds 255, current implementation will show 255 (0xFF) in the Request Sense field. Since LTO-9 has not GA'd, this may or may not be addressed.

RELATIVE LPOS VALUE (bytes 30-33)

Linear Position: the current physical position on tape.

LPOS REGION (byte 69)

There is a field in the reply called LPOS REGION, but the manual does not explain what this is. What is LPOS REGION?

Kevin Butt: LPOS REGION is used for internal logging and debugging purposes. The length of tape has been divided into a number of regions which we call lpos region. These regions are offset from the beginning of tape and are defined as equal length sections along a physical wrap to the end of tape. The first region is defined to start at BOT and the last ends at EOT. So, for example, region 3 spans the section of tape on each physical wrap. This allows for failure analysis that could involve identifying an error burst or media damage/debris at a given location. The number of regions varies by drive type (e.g. LTO-8 has 85, LTO-9 has 82)

REOWP (Read End of Wrap Position)

The READ END OF WRAP POSITION command reports the logical positions at the end of a specified wrap (short format response) or for all wraps (long format response).

The data provided for each wrap is the following:

WRAP NUMBER (bytes 0-1): The wrap number associated with this information.

Note: while PHYSICAL WRAP in the REQUEST SENSE command is only one byte, WRAP NUMBER in REOWP is two bytes. This gives us a way to determine wrap number for files stored on LTO-9 tapes on a wrap greater than 254.

PARTITION (bytes 2-3): The partition number of the wrap specified in the WRAP NUMBER field.

LOGICAL OBJECT IDENTIFIER: The logical object identifier of the logical object at the end of the wrap specified in the WRAP NUMBER field. Logical object means either a logical block (record) or a tape mark.

In practice, if you send this command for wrap W, the value returned for LOGICAL OBJECT IDENTIFIER is the first block of wrap W+1. If you ask for the long format response, then the LOGICAL OBJECT IDENTIFIER value associated to the last wrap is the last block with data on it. This block will almost never be at the end of the wrap.

There is another SCSI command REOWP (Read End of Wrap Position) where you give it a wrap number and it returns the logical object identifier for the object at the end of the wrap. Does obtaining this information require a seek or is it cached in the drive?

Kevin Butt: The REOWP command uses information from the tape directory to provide this information. There is no tape movement related to processing this command.