Overview of Removable Storage
Removable Storage provides services to applications and system administrators that facilitate the use, sharing, and management of removable media devices, such as tape drives and robotic storage libraries. The availability of Removable Storage technology eliminates the need for independent software vendors (ISVs) to develop customized solutions and support for these devices on a per-device basis. More importantly, Removable Storage enables multiple applications to share expensive removable media storage devices. This allows the focus of storage applications to be directed to customer features rather than hardware issues.As shown in Figure 18.1, Removable Storage provides a single set of application programming interfaces (APIs) that allow applications to catalog all removable media (except floppy disks and similar small-capacity media), such as disk, tape, and optical media, which are either stored on shelves (offline) or in libraries (online). Also, by disguising the complexities of underlying robotic library systems, Removable Storage both lowers the costs of developing and operating storage applications and provides consistency to customers who purchase these applications.
Figure 18.1 Removable Media with and Without Removable Storage
Removable Storage uses media pools to organize media. Media pools control access to media; group media by their use; allow media to be shared across applications; and allow such sharing to be tracked.
Basic Concepts
Removable Storage can be described in terms of five basic concepts: media, physical location, media pools, work queue items, and operator requests. The first item in this list, "media," is the most fundamental and affects all others. The remaining four items in the list are the top-level nodes in Removable Storage.
Media
Units of media store information. Each unit of media (or "medium," also referred to as a "cartridge") is of a certain type, such as 8mm tape, magnetic disk, optical disk, or CD-ROM.Most types of cartridges have a single side, but some, such as magneto-optic (MO) disks, have two sides. Cartridges and the sides they contain are tracked in Removable Storage and can take on various states as they are entered into a library and used. For more information about cartridges and side states, see "Media Handling and Usage" later in this chapter.
Physical Location
Removable Storage manages two classes of physical locations: libraries and offline media physical locations. Libraries include both cartridges and the means to read and write them. The offline media physical location is a special holder for cartridges that are cataloged by Removable Storage but do not reside in a library.LibrariesIn its simplest form, a library consists of data storage cartridges and a means of reading and writing to the cartridges. A CD-ROM drive is a simple library with one drive, no slots, an insert/eject (IE) port, and no transport. A more complex example of a library is a robotic-based tape library, which can hold up to several thousand tapes, have one or more tape drives, and have a mechanical means of moving tapes into and out of the drives.Specifically, libraries consist of the following:Slots Slots are storage locations in the library. For example, a tape library has one slot for each tape that the library can hold. A stand-alone drive library has no slots. However, most libraries have at least four slots. Sometimes slots are organized into collections of slots called magazines. Magazines are usually removable.Drives A drive is a device that can read or write to a cartridge. A tape drive, for example, can read and write to a tape that is inserted into it. All libraries have at least one drive.Transports A transport is the robotic device that moves a cartridge from its slot to a drive and back again. Robotic libraries usually have only one transport.Bar Code Readers A cartridge can have a bar code label attached, which is a label that can be read by both humans and computers. Libraries that hold cartridges with bar codes attached might have a bar code reader. The single reader is usually mounted on the transport.Doors A door is a means for gaining unconstrained access to cartridges in a library. For larger libraries, a door might resemble an actual door. Some libraries have no doors, while others have several.Insert/Eject Ports In contrast to doors, which allow unconstrained access to the cartridges in a library, IE ports, also called "mailslots," control access. When an administrator adds cartridges to a library through an IE port, the cartridges are placed in the IE port and then the library uses the transport to move the cartridges from the IE port to a slot. Some libraries have no IE ports; others have several. Some IE ports handle only one cartridge at a time; others can handle several at one time.Types of LibrariesA robotic library can have any of the components described in the preceding list. The minimum that a robotic library contains is cartridges, slots to hold the cartridges, one or more drives, a transport, and either a door or an IE port. Robotic libraries are sometimes referred to as changers or jukeboxes. No human intervention is required to place a cartridge in a library in one of its drives.A stand-alone drive library, or stand-alone drive, is a special kind of library. A cartridge must be placed in a drive manually. The CD-ROM drive on most desktop computers is a stand-alone-drive library. Removable Storage treats stand-alone drives as libraries with one drive and an IE port. An application does not need to know whether a cartridge is mounted by a transport or a human.Offline Media Physical LocationThe offline media physical location is where Removable Storage lists the cartridges that are not in a library. The physical location of cartridges in an online library is the library in which it resides. Cartridges that are not in any of these libraries, such as archived backup tapes on a shelf, are offline media and reside in the offline media physical location. When a user or administrator moves an offline medium into a library, Removable Storage changes its physical location to be the library into which it was placed. When a cartridge is taken out of an online library, Removable Storage designates its locations as the offline media physical location.
Media Pools
A media pool is a logical collection of cartridges that share some common attributes. A media pool contains media of only one type, but media in the media pool can reside in more than one library. Each cartridge is in a media pool. Both sides of a two-sided cartridge are always in the same pool.Each media pool can control access to the media that belong to it. Although these permissions do not control access to the data that is contained on the cartridges, they do control the how the cartridges are manipulated, including an application's ability to move a cartridge from the pool or to allocate a cartridge for its own use.Media pools can be used hierarchically. A media pool can be used to hold other media pools, or it can be used to hold cartridges. An application that needs to group media of several types into one collection can create one application media pool for the whole collection and then additional media pools within the original pool—one for each media type. The free pool, for example, contains a media pool for each media type. There are two classes of media pools: system and application. System media pools are created by Removable Storage for its own use and include the free pools, import pools, and unrecognized pools. Application media pools are created by applications to group media. Grouping media is especially important if several applications share the libraries that are attached to a system.System PoolsThe system pools are used to hold cartridges that are not currently in use. The free pool holds unused cartridges that are available to applications, and the unrecognized and import pools are temporary holding places for cartridges that have been newly placed in a library. For more information about how Removable Storage uses these pools, especially the unrecognized pools and import pools, see "Media Handling and Usage" later in this chapter.Free Pools The free pools support sharing cartridges among applications. They contain cartridges that are freely available to any application, and they hold no useful data. An application can draw cartridges from the free pools, and it can return cartridges to the free pools when the cartridges are no longer needed.Unrecognized Pools When a cartridge is placed in a library, Removable Storage tries to identify it. If it has not seen this particular cartridge before, has not identified the format of the cartridge, or has not identified the application that last wrote data to the cartridge, Removable Storage places the cartridge in the unrecognized pool for its media type. Blank cartridges are treated this way. Cartridges in the unrecognized pools might have data on them, but Removable Storage cannot read any data on these cartridges, and they are not cataloged.Import Pools If Removable Storage can identify the format or the application that is associated with a cartridge that has just been placed in a library but has not been seen before, it places the cartridge in the import pool. For example, if an administrator places a tape written by Backup on one system into a library that is attached to a second system, the instance of Removable Storage on the second system recognizes that the tape was written using Microsoft Tape Format (MTF) and places it in the proper media type import pool.Application PoolsEach application that uses cartridges managed by Removable Storage uses one or more application pools. Applications can create these pools, or they can be created by using Removable Storage. Permissions for application pools can allow applications to share pools or to assign each application its own set of pools.
Work Queues
When applications make a library request, Removable Storage places the requests in a queue and processes them as resources become available. For example, a request to mount a tape in a library results in a mount work queue item, which might wait until a drive is available.Table 18.1 describes the states that a work queue item can have while it is being handled by Removable Storage.Table 18.1 Work Queue States
State | Description |
---|---|
Queued | A work item is queued from the time an application issues a request until the time Removable Storage examines the request. |
In Process | A work item is in process when Removable Storage is actively working on completing it. |
Waiting | If Removable Storage examines the request and finds that one or more of the resources that are needed to satisfy the request is busy (for example, the requested drive is being used by another application), the request enters the waiting state. |
Completed | When Removable Storage completes the request, the work queue item for that request enters the completed state. |
Failed | If Removable Storage is unable to complete the request, the work queue item for that request enters the failed state. |
Operator Requests
NOTESometimes, even with robotic libraries, manual assistance is needed to complete a request or perform maintenance or support. If an application requests that a cartridge in the offline media physical location be mounted, the cartridge has to be manually entered into an online library; this generates a request to the operator to enter the cartridge.A Removable Storage operator request is a request for an administrator to perform a task. Operator requests can be issued by Removable Storage or by Removable Storage client applications, and they are displayed in the Removable Storage console. Removable Storage generates operator requests in the following situations:
"Operator" as used here, is synonymous with "administrator."
Cartridges must be moved online because an application has initiated a mount request for a cartridge that is offline.There are no available cartridges online. the administrator can supply either new cartridges or available offline cartridges to satisfy the request.A device failed and requires service.A drive needs to be cleaned, and there is no usable cleaner cartridge available.
Operator requests can be presented to an administrator through the Windows 2000 Messenger Service or through the system tray. An administrator can complete or refuse the request. The operator request states are described in Table 18.2.Table 18.2 Operator Request States
State | Description |
---|---|
Submitted | The operator request is waiting for the operator to complete the requested operation. |
Refused | An operator has indicated that the requested action is not going to be performed. |
Completed | An administrator has indicated that the action was completed, or Removable Storage has detected that the action was completed. |
Administrators can satisfy or cancel operator requests. After he or she satisfies an operator request, the administrator must acknowledge the request in the Removable Storage console. When an administrator cancels an operator request, Removable Storage notifies the application that generated the request. Removable Storage saves operator requests for less than one hour after they have been satisfied or canceled.
Removable Storage Service
Removable Storage can perform the following requests made by client applications:
Mount and dismount cartridgesClean drivesAdd and remove cartridgesCheck the inventory of the libraryEnable and disable libraries, drives, or cartridgesProvide access to media and library attributes
Removable Storage provides these services to client applications by means of an API that hides the details of the various drives and libraries. Removable Storage implements a generic changer model, which incorporates all essential aspects of libraries and drives. Removable Storage drivers map real drives and changers to this model.Removable Storage can move cartridges within a robotic-based library. The cartridge-moving hardware (usually referred to as a "transport") on robotic libraries varies widely. Some robotic libraries have hands that grab cartridges and move them from a home storage location (usually referred to as a "slot") to a drive. Other types of robotic libraries move magazines that contain cartridges and then push individual cartridges into drives. A mount request from a Removable Storage application mounts cartridges of either description. Figure 18.2 shows the Removable Storage components.
Figure 18.2 Removable Storage Components
Media Handling and Usage
The primary function of Removable Storage is to move cartridges within and between libraries and control access to those cartridges. While Removable Storage is handling the cartridges, they have states associated with them that determine which operations are permitted and which are prevented. While a cartridge is available, for example, any application can claim the cartridge for its own use; however, a cartridge that is in use by one application cannot be claimed by another application.There are two sets of media-related states that govern most of the handling and usage by Removable Storage and its applications: media states and side states.
Media Naming
When new cartridges are placed in a library, Removable Storage assigns an initial display name to the cartridge. This name is derived from several sources, including the on-cartridge label and the bar code. The rules include the following:
If the cartridge has a bar code label, its alphanumeric value is used as the display name.If the cartridge is single-sided and has a recognized label type, the name is taken from the label. if the format is microsoft tape format (mtf), the label is taken from the mtf header. if the format is a file system, the name is taken from the volume name.The sequence number is used.
Media States
The states associated with cartridges reflect the fact that the operations performed on them mostly involve movement. Table 18.3 describes the Removable Storage media states.Table 18.3 Media States in Removable Storage
Physical Media State | Description |
---|---|
Idle | The cartridge is in a slot in a library or on a shelf in the offline physical location. |
In Use | Removable Storage is in the process of moving the cartridge. |
Mounted | The cartridge is in a drive, but it might not be accessible yet. |
Loaded | The cartridge is in a drive, and the contents of one of its sides are accessible. |
Unloaded | The cartridge is still in a drive, but the contents of the side that was loaded are no longer accessible. |
A side is accessible if an application can perform input/output (I/O) operations on it. This definition is important because inserting a tape into a drive does not necessarily make its contents accessible. For some tape drives, a portion of the tape must be pulled out of the cartridge and wrapped around the tape drive head, a process that is sometimes referred to as loading.
Side States
Because data is stored on a cartridge side, the states associated with the sides reflect usage rather than physical location. Table 18.4 lists and describes the Removable Storage side states.Table 18.4 Side States in Removable Storage
Side State | Description |
---|---|
Allocated | A side that has been claimed for use by an application. The side is not available to any other application. |
Available | A side that is available to be claimed and used by any application. |
Completed | A side that is in use, but can no longer be used for write operations. The side is physically or logically full. |
Decommissioned | A side that can no longer be used because it has crossed a usage threshold. It has reached its allocation maximum (specified by the administrator or an application) and cannot be used again. |
Unrecognized | A side whose label types and label IDs are not recognized by Removable Storage. |
Imported | A side whose label type is recognized by Removable Storage, but whose label ID is not recognized. It is a new side that Removable Storage has not seen before, but whose format is recognized by Removable Storage. |
Inaccessible | An inaccessible side of a multisided cartridge that is in a drive. |
Incompatible | A side that is not compatible with the pool in which its cartridge was identified. The cartridge that contains this side must be ejected immediately from the library. |
Reserved | The second side of a two-sided cartridge. It is unavailable for allocation to all but the application which already has the first side allocated. |
Unprepared | A side that is not claimed or used by any application but does not have a free label on it. This is a temporary state. Applications cannot allocate unprepared cartridges. See the following discussion about the interplay between media states and pools. |
Free Media
Sides that are freely available for any application to use are in the available state in the free pool. Removable Storage writes a special label (called a "free label") on these cartridges to clearly identify that these cartridges hold no useful data. While Removable Storage is in the process of writing a free label, it marks the side as "unprepared." This is usually a transitory state, but it can persist if, for example, the cartridge with the side being labeled is in the offline physical media location. Such a side stays in this state until it is inserted into a library. Any transition into the available state causes a free label to be written and, therefore, passes through the unprepared state.When an application needs to claim a side, it allocates an available side, which changes the state of the side from "available" or "imported" to "allocated." An application allocates a cartridge that is in the imported state when it needs data that is on the new side. When the application no longer needs any of the data on the side, it deallocates the side, which returns the state of the side to available.When a cartridge is full—either the side can hold no more data, or the application can write no more data—an application can mark the cartridge as complete.Removable Storage keeps track of the number of times that a side is allocated. When this count crosses a certain threshold, the side is decommissioned. This count is checked each time a side is deallocated. To set the threshold for the number of times that a side can be allocated, right-click the media pool that contains the cartridge, and select Properties.Because the sides of a two-sided cartridge are allocated separately, it is possible for an application to try to allocate both sides or to have the second side claimed by a different application. This can be problematic, especially when cartridges are moved between systems. To eliminate this problem, Removable Storage places the second side of a two-sided cartridge in the reserved state when an application allocates the first side of the cartridge. Only the application that allocated the first side can allocate the reserved second side. If the application determines that it does not need the second side, it can change the state of the second side back to available.When an application deallocates one side of a cartridge that contains reserved sides, Removable Storage changes the state of all reserved partitions to available.