2 ACSLS Logical Libraries

The ACSLS Logical Library (referred to in this document simply as ”logical library”) is a subset of one or more connected physical libraries (drives and volumes). It is currently presented over two interfaces: one is the SCSI and the other is the ACSLS Graphical User Interface (referred to in this document simply as ”GUI”). This document covers the SCSI/FCP interface and mentions the GUI only where it has impact on the SCSI interface. For more information on the management of logical libraries, refer to the ACSLS documentation.

The ACSLS system (referred to in this document simply as the ”system”) presents each logical library as a SCSI Media Changer (SMC) device. Each device appears as a separate LUN on a Fibre Channel (FC) target port contained on the system. Initiator mode FCP SCSI applications (referred to in this document simply as hosts or host applications) attach to the system through a FC SAN and communicate with the logical library using the SCSI commands described in this document. Also attached to the system are one or more physical libraries. A physical library can be any type of library supported by the system. This may include both SCSI and non-SCSI (HLI) libraries. A logical library uses some or all of the resources of one or more physical libraries. A logical library cannot span more than one physical library unless the physical libraries are connected together with a pass through mechanism. The system presents each logical library as a single SCSI library on its own LUN even if the logical library has been configured to use resources from more than one physical library. The system provides LUN masking so that each host sees only the logical libraries that have been configured for it. Only one host connection per logical library is allowed. With this restriction, reservations and reservation conflicts are not possible and are therefore not described in this document.

A logical library is created by a System Administrator (referred to in this document simply as the ”administrator”) using the GUI. The resources of the library are mapped by the system to real resources of the associated physical library (s). This is described in more detail under Elements of a Logical Library below. From the perspective of the SCSI interface, a logical library behaves very much the same as a real SCSI Media Changer, but there are some differences. High level descriptions of these differences are described in this chapter. For detailed description of each command see SCSI Commands.

Elements of a Logical Library

Like a real SCSI library, a logical library consists of the following elements:

  • One hand element

  • One or more import/export elements

  • Zero or more drive elements

  • One or more storage elements

The hand element, storage elements, and import/export elements are all logical entities; they do not have corresponding physical resources in the physical library. Drive elements, however, do correspond one to one to a real physical drive in the physical library. Below is a description of each element and the considerations that a host application may need to understand in order to properly control a logical library.

Hand Element

All Logical libraries have one hand element at SCSI element address 0. This is a logical entity only, i.e. it does not correspond to any physical hand. A Read Element Status can be issued for this address but it will always appear to be empty. The source or destination of a Move Medium command cannot be the hand element. This is consistent with the response given for the Device Capabilities Page of the Mode Sense command.

Import/Export Elements

Each logical library has a configurable number of consecutive import/export elements starting at SCSI element address 10. The maximum number of import/export elements that can be configured is 490. These elements do not correspond to physical cells in the physical library. The actual number of elements that are configured can be queried using the Mode Sense(6) command.

Volume Movement

Volumes can be moved to any configured import/export element using the Move Medium command; however, the elements cannot be used as a place to store a volume. This is consistent with the response given for the Device Capabilities page of the Mode Sense command. When a volume is moved to an import/export element, it is automatically unassigned from the logical library. From the SCSI interface perspective, after the move the volume no longer exists in the logical library, however it is still present in the physical library. Read Element Status for import/export elements always report that the element is empty. Therefore, logical library, import/export elements can be conceptually thought of as one way chutes where volumes can be sent through in order to eject them from the library. In order to provide compatibility with a physical SCSI library, the next command issued following a successful Move Medium command to an import/export element causes a unit attention condition with the following sense information:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 28h / 01h (Cap Element Accessed)

Presenting this unit attention tells the host that one or more import/export elements may have been accessed manually by an administrator. In this case, if the host elects to issue a Read Element Status for the import/export element that was just used in the previous Move Medium command, it will find that the element is empty. The host application can then assume that the volume has been removed. This is the same behavior a host would experience with a physical library if the real CAP is accessed. Note, however, that issuing the Read Element Status in response to the unit attention is not necessary. If the previous Move Medium had completed successfully, a host application can safely assume that the volume has been logically ejected from the library and recovery from the unit attention can be simply to retry the Move Medium command. Import/export elements never contain a volume.

As indicated in the Mode Sense Device Capabilities Page, movement from import/export cells is not supported. Any Move Medium command that uses and import/export element for the source address will fail with:

  • Sense Key 5h (Illegal Request)

  • ASC / ASCQ 21h / 01h (Invalid Element)

This means that import/export elements are never used to enter volumes into a logical library. They are only used as a way for SCSI host applications to programmatically eject volumes. Volumes can only be entered directly into a logical library to available storage elements through an assignment operation performed by an administrator using the GUI. This is described in more detail under Storage Elements below.

Capacity Changes

Whenever an administrator changes the number of import/export elements configured for a logical library using the GUI, the system raises a unit attention condition with the following sense information:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 2Ah / 01h (Mode Parameters Changed)

Host applications must issue Mode Sense to determine the new number of import/export elements available.

Prevent/Allow Considerations

With a real SCSI library, the Prevent/Allow Medium Removal command allows a host to lock and unlock access to a physical CAP. Since a logical library does not have a physical CAP (it has logical import/export elements but they do not correspond to a physical CAP) this command is supported for compatibility purposes and will always succeed. It is essentially a NOOP.

Storage Elements

Each logical library has a configurable number of consecutive storage elements starting at SCSI element address 1000. The maximum number of storage elements that can be configured is 64,535. Note that a logical library's storage element count can be configured to be greater than or less than the physical library (s) cell count. These elements are logical and do not correspond directly to physical cells of the physical library. Volumes can be moved to any unoccupied storage element using the Move Medium command. Even if the source of the move is an occupied storage element, no robotic movement occurs, only the association between the logical SCSI element address and the actual physical location of the volume in the physical library is updated. If movement is to or from a valid drive element, robotic activity does occur in the physical library since logical library drives correspond one for one with physical drives. See Drive Elements for more details.

Assigning and Unassigning Volumes

When a logical library is created by the administrator using the GUI, all storage elements are initially empty. To populate volumes into the empty storage elements an administrator must perform an assignment operation using the GUI. Likewise, to remove volumes from occupied storage elements the administrator may perform an unassign operation. Volumes can also be logically removed via the Move Medium command when the destination is an import/export element. See Import/Export Elements.

Each time a volume is either assigned to or unassigned from a logical library, the system raises a unit attention condition on the interface for the next SCSI command received as follows:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 28h / 00h (Not Ready-to-Ready Transition)

This emulates the behavior of a physical library when an operator opens the door and either manually adds or removes volumes directly to/from storage elements. When the door is closed, the physical library re-inventories its contents and presents a Not-Ready-To-Ready Unit Attention when it has finished. For logical libraries, this happens instantly after assign or unassign operations. After receiving this unit attention a host application should issue Read Element Status for all storage elements to determine the current contents of the logical library.

Volume Movement

When a volume is moved from a storage element (via the Move Medium command) to another location, the action carried out by the system depends on the destination element type as follows:

  • Hand element - not allowed.

  • Import/export element - the action carried out is as described under Import/Export Elements above.

  • Drive element - the volume is moved from the associated physical library storage location to the physical drive in the physical library that corresponds to the SCSI element address specified in the command.

  • Storage element - no robotic movement takes place, only the volumes associated SCSI Element address is changed.

Capacity Changes

Whenever an administrator successfully changes the number of storage elements configured for a logical library (using the GUI), and that change does not result in any volumes changing their SCSI element address, the system raises a unit attention condition on the interface for the next SCSI command received as follows:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 2Ah / 01h (Mode Parameters Changed)

Host applications must issue Mode Sense to determine the new number of storage elements available but can safely assume that the current volume inventory has not changed locations.

If the change to the number of configured storage elements does cause volumes to be logically moved to different storage elements (this can happen if the capacity is decreased causing volumes to be logically moved to other unused storage elements), the system raises two unit attention conditions for the next two commands received as follows:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 28h / 00h (Not Ready-To-Ready Transition)

  • ASC / ASCQ 2Ah / 01h (Mode Parameters Changed)

In this case a client application should issue both a Mode Sense command (to determine the new number of storage elements available) and a Read Element Status to determine the contents of each storage element. If the client application ignores this unit attention and continues to use information about the library that it had obtained previously, subsequent commands may fail unexpectedly; therefore, it is important that a client application reconcile both the configuration and inventory of the library after receiving the Not Ready-to-Ready Transition and Mode Parameters Changed unit attentions.

Drive Elements

Each logical library has a configurable number of drive elements starting at element address 500. The maximum number of drive elements that can be configured is 500. The response to a Read Element Status always includes an entry for every drive element currently configured; however, each drive element may or may not be associated with a physical drive. If the element is not currently associated with a physical drive the ED bit (byte 9, bit 3) is set to 1 and the Access bit (byte 2, bit 3) is set to 0 in the Read Element Status response.

Capacity Changes

Initially, the number of drive elements is set when the logical library is created. Subsequently, this number can be changed by the administrator (using the GUI). If this number is changed, the system raises a unit attention condition on the interface for the next SCSI command received as follows:

  • Sense Key 6h (Unit Attention)

  • ASC / ASCQ 2Ah / 01h (Mode Parameters Changed)

If the count is decreased and results in any association change (between drive element address and physical drive) then the system precedes the Mode Parameters Changed unit attention with:

  • Sense Key 6h (Unit Attention)

  • ASC/ASCQ 28h / 00h (Not Ready-To-Ready Transition)

If the host only receives the Mode Parameters Changed unit attention then it should issue Mode Sense to determine the new number of drive elements available. It can assume that no element address associations have changed. However, if the Not-Ready-To-Ready unit attention is received, the host should be sure to update its drive configuration with current information obtained via Read Element Status.

Adding and Removing Drives

Physical drives can be added or removed from a logical library by the administrator using the GUI. When a drive is added, it is automatically assigned to the next available drive element address starting with the lowest address. When a drive is removed, the system disassociates the physical drive from the drive element (the ED bit will be set to 1 and the Access bit set to 0 in a Read Element Status response) but the number of drive elements (as reported by Mode Sense) remains unchanged. No unit attention conditions are raised.

Drive Failures

A drive failure condition (as perceived by the host application) will result from any one of the following actions:

  • The drive is varied offline by the administrator.

  • The drive is removed from the logical library by the administrator.

  • The drive is physically powered off or disconnected.

  • The drive is experiencing a physical hardware failure.

All of the above conditions result in the following:

The descriptor entry in the Read Element Status response has the Except bit (byte 1, bit 2) set to 1 and the Access bit set to 0 and the ASC/ASCQ fields (bytes 4 and 5) are set to 04h / 02h (Hardware Error, Tape Drive).

A Move Medium command that addresses the drive will fail with:

  • Sense Key 4h (Hardware Failure)

  • ASC/ASCQ 40h / 02h (Hardware Error, Tape Drive)

Command Support

Logical libraries do not support all SMC commands. Commands that deal primarily with physical hardware are not supported, i.e. Mode Sense (10). Some commands are supported but don't actually do anything (i.e., Initialize Element Status). Other commands are supported but only for a subset of the possible response pages, i.e. Mode Sense (6). The intent is to provide command emulation that will allow for a wide adoption of logical libraries with little or no change to host applications. Unsupported commands will fail with Check Condition Sense Key 05h (Illegal Request), ACS / ACSQ 20h / 00h (Invalid Command). The commands listed below are ones that may behave differently then they would for a real library.

Inquiry

The Inquiry data for a logical library is unique, i.e., it does not report that it is a known real library type. Also, the device identification page uses a NAA type 6 format using the logical library unique serial number as part of the vendor specific extension. This provides a way for clients to uniquely identify a library regardless of which target port the device is presented on.

Serial numbers for logical libraries consist of 12 ascii numbers. The format is SSSSSSSSNNNN where:

  • SSSSSSSS is the unique software serial number of the system

  • NNNN is the number of the library partition within the system (0-9999)

If an Inquiry command is received from a host initiator on a lun that is not currently mapped to a logical library, Inquiry returns a response with the Peripheral Qualifier set to 011b and Peripheral Device Type set to 1fh. Lun mapping is established by an administrator using the GUI.

Mode Sense (6)

The Mode Sense (6) command supports the Element Address Assignment (1Dh) and Device Capabilities (1Fh) pages only.

Note:

A logical library does not support element storage for I/E elements and an I/E element cannot be the source of a Move Medium command. The Move Medium command will fail with CHECK_CONDITION, SenseKey Illegal Request (5h), and ACS/ASCQ Invalid Element (2 1/01h)

Move Medium

Move Medium commands that do not involve a drive element complete much faster for a logical library than for a physical library.

Move Medium to/from drive elements cause real robotic activity in the physical library. The time required before completion of the move is reported depends on the Fast Load setting at the time the command is received (this setting is found under "Preferences" in the ACSLS GUI).

Move Medium commands to/from import export elements behave differently than a real library. These differences are described in Import/Export Elements.

Prevent/Allow Medium Removal

Since a logical library does not contain a physical CAP, this command is supported for compatibility but always returns ”success”.

Read Element Status

The format of the Primary Volume Tag Information field can be in one of four formats, 6 character, 8 character suffix, and 8 character prefix. The format to be used is an attribute of the logical library that can be set by the administrator using the GUI. This is described in detail under the VolTag field of the ReadElementStatus CDB in the ”SCSI Commands” chapter.

Report LUNs

The system presents each logical library as a separate LUN on one of the systems' fibre channel target ports. The system provides LUN masking by allowing only specified initiators access to logical libraries. Initiators are identified using their FC world wide port name (WWPN). Using the GUI, an administrator must establish a mapping between an initiator (I), a target port (T), and a LUN (L). These mappings are saved by the system so that the logical library will always be presented on the same target port and LUN for the initiator. Each initiator is given its own LUN space starting with LUN 0. It is important to note that logical libraries can appear on LUNs other than 0. The first library mapped to an initiator will be assigned LUN 0, the next (on the same target port) will be assigned LUN 1 and so on.

The Report LUNs command will report the LUNs available to the requesting initiator. The command response includes the LUN number for each logical library that has been mapped for the requesting initiator. The LUN numbers are not guaranteed to be consecutive.

Whenever a mapping change is made by an administrator using the GUI, the system raises the following unit attention to the affected initiator:

  • Sense Key 6h (Unit Attention)

  • ACS / ACSQ 3Fh / 0Eh (Report LUNS Data Has Changed)

Request Sense

Logical libraries use an FC-2 conforming transport that provides autosense. This means that sense data for a failed command is always returned with a Check Condition status in the command response and is never saved by the target. Therefore, Request Sense will always return Sense Data with a Sense Key set to No Sense and ASC/ASCQ fields set to 0. The Request Sense command still documents all the Sense Data that can be returned from the other commands.

Reserve/Release

The Reserve and Release commands are purposely not supported in ACSLS 8.2. Each logical library can be mapped to a maximum of one initiator. Therefore, every logical library is exclusively owned by a single initiator and Reserve / Release would have no meaning. These commands are rejected with CHECK_CONDITION.

Tape Drives and Media Types Supported

A logical library can contain any of the drives and media that can reside in any of the SL series of StorageTek libraries (SL500, SL8500, or SL3000). Note that drives and media that a logical library can support is a superset of all the drive and media types supported by these libraries. An individual logical library would only ever contain a subset of these types. Drives and media (volumes) are allocated to a logical library by the administrator using the GUI. For a list of tape drives and tape media supported, as well as tape drive and media compatibility, see the ACSLS Product Information Guide.