ACTIVATE fails with the following message when attempting to delete a tape device:
REASON=0151,CAN NOT DELETE DEVICE nnnn
DESCTEXT=DEVICE PINNED, ASID = xxxx
MIM2098 DEVICE nnnn PINNED BY MIA. TASK=MIMTPATT
During initialization, MIA pins all devices that it is managing, then unpins the devices at shutdown. MIA also pins/unpins around many functions that update a UCB for a managed tape device.
The ACTIVATE process requires that a device to be deleted be unpinned. When MIA detects an ACTIVATE, it will unpin the devices it is managing. However, if a device that is managed by MIA had previously been involved in a DDR SWAP, then unpinning may not occur during ACTIVATE (unpinning will still occur at MIA shutdown or if MIA is instructed to no longer manage a device). The result is that the device deleting ACTIVATE fails with a description saying MIM2098 device pinned by MIA. This description was provided by MIA through the parameter list at the time that MIA invoked the pin service. The success or failure of an ACTIVATE is displayed in the 'IOS500I ACTIVATE RESULTS' message.
The circumvention for this problem is to instruct MIA to not manage any device which failed ACTIVATE processing, re-run ACTIVATE, then instruct MIA to once again manage each affected device. MIA can be instructed to dynamically manage or not manage a device by issuing the MIA RESYNCH command.
Here are the steps:
- Compile a list of all devices identified in the IOS500I message that ACTIVATE cannot delete because they are pinned by MIA. Each device will have REASON=0151 along with the MIM2098 description.
- If you define tape devices to MIA using DEVCLASS=NONE and DEVLIST=MIMUNITS, then comment each device from Step 1 in your MIMUNITS member by placing an asterisk in column one. Then, proceed to Step 4.
- If you define tape devices to MIA using DEVCLASS=TAPE and DEVLIST=NONE, then you will need to build a temporary MIMUNITS member in your MIA parmlib in which the devices identified in Step 1 are omitted. The MIM2004 message which is issued during MIA initialization lists all devices managed by MIA at startup. This list can be used as a reference when building the MIMUNITS member. Refer to the section called How You Identify Devices to CA MIA in the Advanced Topics Chapter in the CA MIA Programming Guide for details on coding the device definitions. Remember to omit the devices identified in Step 1. The MIMUNITS member that you create will be input to the MIA RESYNCH command in the next step.
- Issue the MIA RESYNCH command to instruct MIA which devices to manage (and not manage):
This command will cause MIA to rebuild its list of managed devices based upon the device definitions in the MIMUNITS member. The devices that were omitted from the MIMUNITS member will no longer be managed (or pinned) by MIA.
- Rerun the ACTIVATE IODF command that had failed.
- After the ACTIVATE command completes successfully, instruct MIA to once again manage the devices from Step 1. If you normally define tape devices to MIA using DEVCLASS=NONE and DEVLIST=MIMUNITS, then un-comment in your MIMUNITS the devices from Step 1 and issue the MIA RESYNCH command:
MIA will resynchronize and the un-commented devices will once again be managed by MIA. Proceed to Step 8.
- If you normally define tape devices to MIA using DEVCLASS=TAPE and DEVLIST=NONE, then issue the following MIA RESYNCH command:
MIA will resynchronize and all devices defined with device class TAPE will be managed by MIA.
- The MIA RESYNCH command has a local scope. This means that the steps above must be repeated on each MIA system where the ACTIVATE is being done.
An alternative to the steps above is to shut down MIA long enough to execute the ACTIVATE and then restart MIA. The danger in shutting down MIA is that an integrity exposure will exist in which dual allocation of tape devices can occur. This option could only be used if you can guarantee that no tape device allocations will occur during the time that MIA is down. The LOCAL option of the MIA SHUTDOWN command should be used so that any devices that are currently allocated are not freed for use by other systems.