When the system is initialized, magnetic tape cartridge devices are first explicitly DETACHED from the system.
For ATTACHED generated disk devices, and those belonging to the home pubset, device and controller attributes are determined via input/output commands. A device is explicitly DETACHED from the system if these attributes cannot be determined due to INPUT/OUTPUT errors.
When a magnetic tape or disk device is attached, the first thing that happens is that device and controller attributes are determined. If this cannot be done successfully, the ATTACH procedure is rejected.
Exception
If the determination of the attributes for magnetic tape devices was rejected as a result of “NO PATH AVAILABLE”
(CC=3), the ATTACH procedure is permitted. This means it is possible to overconfigure for the purposes of overallocation.
Special information on tape devices
Tape devices (MTC devices and emulated tape devices) are only ATTACHED if they can be physically reserved for the home system. Once tape devices have been successfully attached, they are assigned exclusively to a system.
ATTACH-DEVICE
When a tape device is being attached, an attempt is made to reserve the device. The message NKR0042 DEVICE=mn ATTACH ACCEPTED
is issued and the device is placed in the ATTACH-PENDING state.
Once the device has been successfully reserved, the message NKR0110 DEVICE=mn DEVICE ATTACHED AND ASSIGNED
is issued, and the tape device assumes the ATTACHED state.
If the tape device has been reserved by another system, the messages NKR0111 DEVICE=mn DEVICE ASSIGNED ELSEWHERE
and NKR0044 DEVICE=mn ATTACHMENT REJECTED
are issued, and the tape device is placed in the DETACHED-EXPLICITLY state.
If the tape device cannot be assigned for other reasons, the following message is issued:
NKR0112 DEVICE=mn COULD NOT BE ASSIGNED.
A dummy tape device will be attached even if assignment is rejected due to the unavailability of the device or device controller. In this case, the following messages are issued instead of the NKR0110
message: NKR0112 DEVICE=mn COULD NOT BE ASSIGNED
NKR0040 DEVICE=mn ATTACHED
DETACH-DEVICE
In the case of detachment (explicit or implicit), an attempt is made to cancel the hardware reservation:
During this time, all devices/paths affected by the reconfiguration job are placed in the DETACH-/REMOVE-PENDING state.
The message:
NKR0114 DEVICE=mn DEVICE UNASSIGNED
indicates successful execution; The message:NKR0115 DEVICE=mn COULD NOT BE UNASSIGNED
. indicates that the hardware reservation could not be canceled.If an ATTACH-DEVICE command is issued during the wait time, a new allocation attempt is made.
Effects of a DETACH-DEVICE/REMOVE-DEVICE-CONNECTION command with the FORCE=*YES operand on the controller:
The controller acknowledges write jobs if the data to be transferred is stored in one of the controller’s buffers; It then transfers the data asynchronously to the volume.
The system then waits a maximum of 2 minutes for successful transfer to the tape device or for data that could not be transferred to be read in again. One of the following messages is issued:
NKR0020 DETACH DEVICE ACCEPTED
NKR0021 REMOVE DEVICE CONNECTION ACCEPTED
During this wait time the tape device is in the DETACH-PENDING state.
After expiration of this wait time, at the latest, an attempt is made to cancel the hardware reservation.
Issuing an ATTACH-DEVICE command during the wait time results in cancellation of the DETACH job.
When the system is terminated, an attempt is made to cancel all (still) existing hardware reservations for the system. If the attempt fails, the following message is issued:NKR0115 DEVICE=mn COULD NOT BE ASSIGNED
If an attempt to attach a device is rejected with the message NKR0111 DEVICE=mn DEVICE ASSIGNED ELSEWHERE
, the tape device is reserved by an external system. The UNLOCK-DEVICE command can be used to cancel the reservation by the external system. After a system crash this command can be used to release the tape device.