Platform SDK: Removable Storage Manager |
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. The following figure illustrates the typical media pool cycle of RSM media.
When a new cartridge is inserted into an online library, RSM typically puts the cartridge in either the import or the unrecognized media pool. The administrator or your application can move the cartridge to the appropriate free media pool using the MoveToNtmsMediaPool function.
The following figure illustrates the typical media state cycle of RSM media.
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 cartridge, you can set the its state to Completed using the SetNtmsMediaComplete function. Typically, Completed media is not written to again. Placing a cartridge 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 free 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).