[This is preliminary documentation and subject to change.]
This section describes the typical life cycle of RSM media. Most media in RSM follows the same path; variations from this path are provoked by unusual situations. An example of an unusual situation is introducing media from one RSM system into another.
The following figure illustrates the typical media pool cycle of RSM media.
When an unrecognized medium is inserted into an online library, RSM typically puts the medium in the foreign media pool. The administrator or your application can move the medium to the appropriate scratch media pool using the MoveToNtmsMediaPool function.
The following figure illustrates the typical media state cycle of RSM media.
When a new medium is inserted into an online library, RSM typically sets the medium's state to Foreign. When the administrator or your application moves the medium to a scratch media pool, RSM sets the medium's state to Available. You can use the AllocateNtmsMedia function to allocate Available media in the application media pool. If there are no Available media in the application media pool and the Draw from Scratch option is set to True, RSM allocates media from a scratch media pool. After you allocate media, you can use the MountNtmsMedia function to mount and write to the medium.
Note When you use the MountNtmsMedia function to mount tape media, remember that your application must specifically set the drive to fixed or variable block mode. Your application cannot assume that the device is in the default mode. You can use the Microsoft® Win32® function, SetTapeParameters to set the drive mode.
When you do not want to record any more information on the medium, you can set the medium's state to Completed using the SetNtmsMediaComplete function. Typically, Completed media will not be written to again. Placing a medium in the Completed state allows a management application to replicate or refresh the media.
Media that hold less vital information and are recorded on many times are typically decommissioned after the maximum number of allocations. Only Available media can be decommissioned, so you must use the DeallocateNtmsMedia function before you can decommission a piece of media. You can use the DecommissionNtmsMedia function to decommission Available media.
After you deallocate media, you can leave the media in the application media pool or move it to a scratch media pool so that it can be used by other applications. Your application can reallocate Available media that remains in the application media pool until it has reached its allocation maximum (determined by the administrator or an application).