[This is preliminary documentation and subject to change.]
Media states identify the condition of each partition of the media in an RSM system and define which applications have access to partitions. When media is introduced to RSM, RSM reads the OMID or bar code of the media to determine the state of the partition. This process is known as classification.
The following table describes the RSM media states.
Media State | Description |
---|---|
Allocated | Media that are in use and assigned to application media pools. |
Available | Media that can be allocated for use by applications. |
Completed | Media that are in use but can no longer be used for write operations. |
Decommissioned | Media that have reached their allocation maximum (specified by the administrator or an application) and cannot be used again. |
Foreign | Media whose label types and label IDs are not recognized by RSM, and media that are new to RSM. |
Imported | Media whose label types are recognized by RSM, but whose label IDs are not recognized by RSM. |
Incompatible | Media that are not compatible with the library in which they were classified. This media should be immediately ejected from the media library unit. RSM puts Incompatible media in the foreign media pool. |
Reserved | Media that are being held by an application. |
Unprepared | Media that are in a scratch media pool but have not been assigned scratch labels by RSM. This is a temporary state; applications cannot allocate Unprepared media. |
The following figure illustrates what happens when media is inserted into an RSM library.
When media is inserted into a library unit in an RSM system, RSM classifies the medium by reading its bar code (if unique) or OMID. If the RSM database contains information about the medium, RSM does not alter the current states of its partitions and relies on the information in the RSM database.
If RSM does not recognize the label type of an OMID or if the medium is new to RSM, RSM sets the medium's state to Foreign. If RSM recognizes the label type but not the label ID, RSM sets the medium's state to Imported.
If the medium is not compatible with the current library, RSM sets the medium's state to Incompatible. Media in the Incompatible state cannot be changed to another state, and it should be ejected from the media library unit.
Foreign and Incompatible media do not have a recognized OMID and are not managed by RSM. They are deleted from the database when they are ejected.
RSM never sets the state of inserted media to Reserved. This state can only be set by an application.
The following figure shows movement out of the Foreign state.
When media that RSM cannot identify is inserted into a RSM library, RSM sets the medium's state to Foreign and moves the medium to the foreign media pool.
Foreign media can only be changed to the Available state by moving it to the scratch pool. Foreign media must be explicitly changed by an administrator or an application.
The following figure shows movement in and out of the Available state.
RSM moves media from the Available to the Allocated state when an application allocates it using the AllocateNtmsMedia function.
When an application deallocates media, RSM checks the database for the number of times the specified medium has been allocated. If the medium has reached its allocation maximum, RSM changes the state of the medium to Decommissioned. Only media in the Available state can be changed to the Decommissioned state.
When an application deallocates one partition of a piece of media that contains Reserved partitions, RSM changes the state of all Reserved partitions to Available.
Available and Decommissioned media can be in scratch or application media pools.
The following figure shows movement in and out of the Allocated state.
Media in the Allocated state can be changed to the Available and Completed states. The process of changing the state of media from Allocated to Available is called deallocation. The process of changing the state of a piece of media from Allocated to Completed is called completion.
You can allocate and deallocate media without moving it out of an application media pool.
When you use the _ALLOCATE_NEW option of the AllocateNtmsMedia function, RSM allocates one partition of the specified medium and sets the state of all other partitions to Reserved. You can specify the _ALLOCATE_NEXT option of the AllocateNtmsMedia function to allocate the next Reserved partition of the specified media. When there are no more Reserved partitions, RSM returns an error message.
The following figure shows movement in and out of the Imported state.
The state of Imported media must be explicitly changed to Available or Allocated.
When media are moved from the import media pool to a scratch media pool, RSM sets the state of the media to Available.
RSM initially sets the state of CD-ROM media to Imported and places it in the import media pool.
Many changes in media state are accompanied by movement between media pools. For example, you can configure application media pools to automatically allocate media from scratch pools when there are no Available media in the application media pool; this is the Draw from Scratch option. You can also configure application media pools to automatically return Available media to scratch pools; this is the Return to Scratch option.. These options can be set using the RSM API or the RSM MMC snap-in.
When RSM deallocates media and changes the state to Available, RSM checks the allocation count. If the specified medium has been allocated the maximum number of times, it is decommissioned by RSM. If the specified medium has not been allocated the maximum number of times, RSM checks the Return to Scratch option. If the Return to Scratch option for that application media pool is set to True, RSM returns the specified medium to the appropriate scratch media pool. If the Return to Scratch option is set to False, the media remains in the application media pool.
The administrator can also set the Draw from Scratch option for an application media pool. If this option is set to True, RSM automatically allocates media from the appropriate scratch media pool when the application media pool does not contain any Available media. If this option is set to False, RSM generates an error message when there are no Available media in the application media pool.