Detach hardware units
Component: | BS2000 |
Functional area: | Device management |
Domain: | DEVICE |
Privileges: | OPERATING |
Routing code: | G |
Function
This command enables the operator to detach one or more hardware units, i.e. prohibit the operating system from using these units.
Effect of the DETACH-DEVICE command
Each of the hardware units specified assumes (if permitted) the state “detached explicitly”. In this case, the hardware units cannot be used by the system for input/output.
All relevant outward connections assume the state “removed implicitly”. These connections cannot be used.
Each outer unit none of whose internal connections is in the “included” state is placed in the state “detached implicitly”. The unit cannot be used.
If the units to be detached are hardware units with corresponding SVP actions, these actions are initiated. The units are placed in the configuration state “detached”, regardless of whether these actions are successful.
If a device which is capable of forming a path group is detached then the path group for this device is eliminated. If a channel or controller is detached then the path groups of all the connected devices are eliminated.
If a PAV device (Parallel Access Volumes, see the “Introduction to System Administration” [14]) is detached then the following applies:
If a base device is detached, the associated alias devices switch to the “not ready” status and are implicitly detached. Alias devices can also be explicitly detached by means of the DETACH-DEVICE command.
- If a FastDPAV base device is detached, all associated alias devices are not detached implicitly (see the manual “Introduction to System Administration” [14]).
- For a FastDPAV alias device in the configuration state ENABLED, the state DISABLED can be set by means of the DETACH-DEVICE command.
Format
DETACH-DEVICE | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Operands
UNIT =
Specifies the hardware units to be detached from the system.
UNIT = *CPU(...)
Specifies the CPU to be detached.
CPU-IDENTIFIER = list-poss(16): <x-text 2..2>
Specifies the CPU identifier.
UNIT = *EXTRA-CPU(...)
Specifies the extra CPU that is to be detached.
CPU-IDENTIFIER = *ALL / *ANY / <x-text 2..2>
Specifies the identifier of the extra CPU. *ANY detaches one available extra CPU. *ALL detaches all available extra CPUs.
UNIT = *CHANNEL(...)
Specifies the channel to be detached.
CHANNEL-PATH-ID = list-poss(16): <x-text 2..2>
Specifies the channel path ID of the channel. In the case of channels, the device code (MN) is the same as the hexadecimal channel path ID.
SCOPE =
Specifies how the command is to be executed in VM2000 operating mode.
SCOPE = *OWN-SYSTEM-ONLY
The command is only executed in the local system.
SCOPE = *VM2000-GLOBAL
If entered in the Monitor System (SU /390 ), the command is executed in all guest systems. If entered in another guest system or in the Monitor System (SU x86), the command is rejected with the message NKR0178.
The command is rejected if one of the guest systems is protected against global detachment (system parameter VMGIORAL=NO) and the channel that is to be detached does not yet possess the status DETACHED (unless FORCE= *UNCONDITIONAL-OFFLINE has been specified).
UNIT = *CONTROLLER(...)
Specifies the controller to be detached.
CONTROLLER-UNIT = list-poss(16): <alphanum-name 2..2> / <x-text 4..4>
Specifies the mnemonic device code (MN) of the controller to be detached.
SCOPE =
Specifies how the command is to be executed in VM2000 operating mode.
SCOPE = *OWN-SYSTEM-ONLY
The command is only executed in the local system.
SCOPE = *VM2000-GLOBAL
If entered in the Monitor System (SU /390), the command is executed in all guest systems. If entered in another guest system or in the Monitor System (SU x86), the command is rejected with the message NKR0178.
The command is rejected if one of the guest systems is protected against global detachment (system parameter VMGIORAL=NO) and the controller that is to be detached does not yet possess the status DETACHED.
UNIT = *CHANNEL-RANGE(...)
Specifies a set of channels to be detached.
Note
In the case of channels, the device code (MN) is the same as the hexadecimal channel path ID.
FROM = <x-text 2..2>
Specifies the channel path ID of the first channel in the set of channels to be detached.
TO = <x-text 2..2>
Specifies the channel path ID of the first (FROM) and last (TO) channel in the set of channels to be detached. The following rules apply: chn1 -id < chn2 -id and chn2 -id - chn1-id < 64 , i.e. a maximum of 64 channels can be detached at a time.
SCOPE =
Specifies how the command is to be executed in VM2000 operating mode.
SCOPE = *OWN-SYSTEM-ONLY
The command is only executed in the local system.
SCOPE = *VM2000-GLOBAL
If entered in the Monitor System (SU /390 ), the command is executed in all guest systems. If entered in another guest system or in the Monitor System (SU x86), the command is rejected with the message NKR0178.
The command is rejected if one of the guest systems is protected against global detachment (system parameter VMGIORAL=NO) and the channels that are to be detached do not yet possess the status DETACHED (unless FORCE= *UNCONDITIONAL-OFFLINE has been specified).
UNIT = *DEVICE-RANGE(...)
Specifies a number of up to 256 devices that are to be detached. The device type codes specified in the range do not have to be contiguous. If no device is generated for one of the device type codes, then processing continues with the next device type code that follows.
FROM = <alphanum-name 2..2> / <x-text 4..4>
Specifies the device type code of the first device in the range of devices to be detached.
TO = <alphanum-name 2..2> / <x-text 4..4>
Specifies the device type code of the last device in the range of devices to be detached.
UNIT = PUBSET-DEVICES(...)
Specifies that a pubset’s disks are to be detached. The pubset must have been imported at least once. The mnemonic device codes (MNs) of the associated disks are administered in the system disk’s SVL. This entry is made on IMPORT-PUBSET, EXPORT-PUBSET or MODIFY-PUBSET-PROCESSING.
As many disks as possible are always detached. If pubset disks are mirrored then the following should be noted:
In the case of mirroring with DRV, both disks are detached.
In the case of mirroring in external disk storage systems (see the “SHC-OSD” User Guide [37]) then only the standard disks (source or normal unit) are detached. If the mirror disks are to be detached, then the mirror disk (target or additional mirror unit) of the system disk (pubres) must be specified in the PUBSET operand.
PUBSET = list-poss(255): <cat-id 1..4> / *BY-PUBRES-DEVICE(...)
Designates the pubset whose disks are to be detached. The pubset can be specified via its catalog ID or the device code of its system disk.
PUBSET = <cat-id 1..4>
Specifies the pubset’s catalog ID. There must be a corresponding entry in the MRS catalog. If no such entry exists then the disks can only be detached by specifying the system disk (see PUBSET=*BY-PUBRES-DEVICE).
PUBSET = *BY-PUBRES-DEVICE(...)
Specifies the pubset’s system disk (pubres).
UNIT = list-poss(255): <alphanum-name 2..2> / <x-text 4..4>
Mnemonic device code (MN) of the pubres.
UNIT = list-poss(16): <alphanum-name 2..2> / <x-text 4..4>
Specifies the mnemonic device code (MN) if a controller or a device is to be detached.
FORCE =
Specifies the execution mode.
FORCE = *STD
The reconfiguration job is to be executed only if the unit is not being used. There is a maximum wait time of 15 minutes for release of the unit. During the wait time the unit is in the DETACH-PENDING state. If it is released within 15 minutes, the unit switches to the DETACHED state, otherwise it returns to the ATTACHED state.
FORCE = *YES
The reconfiguration job is to be executed immediately. This setting is not permitted for detaching CPU (see notes).
FORCE = *NO(...)
The reconfiguration job is only to be executed immediately if the unit is not being used. Otherwise the time specified in the WAIT operand must elapse before the unit is released. The device then switches to the DETACH-PENDING state. If the unit is released within the specified period, it switches to the DETACHED state; if not, it switches to the ATTACHED state.
WAIT =
Specifies the maximum wait time for execution of the reconfiguration job in execution mode FORCE=*NO.
WAIT = *NO
No maximum wait time is specified for execution of the reconfiguration job.
WAIT = *STD
The maximum wait time for execution of the reconfiguration job is set to 15 minutes.
WAIT = <integer 1..32767>(...)
Specifies the maximum wait time.
DIM =
Specifies whether the value defined for the wait time is to interpreted in minutes or seconds.
DIM = *STD
Wait time as for DIM=*MIN.
DIM = *MIN
Specifies the maximum wait time in minutes. Possible values: 1 <= <integer> <= 546
DIM = *SEC
Specifies the maximum wait time in seconds. Possible values: 1 <= <integer> <= 32767
FORCE = *UNCONDITIONAL-OFFLINE
The reconfiguration job should always be performed immediately. Unlike FORCE=*YES, the hardware action associated with the job should always be executed immediately. This setting is only permitted for the detachment of channels (CHANNEL or CHANNEL-RANGE) in the monitoring system (SU /390).
The protection of any of the guest systems against global detachment (system parameter VMGIORAL=NO) is ignored if this operand is specified.
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | No error | |
1 | 64 | ETMRK.. | Command execution faulty |
2 | 64 | ETMRK.. | Command partially processed without error |
4 | 64 | NKR0... | Hardware unit was already detached |
12 | 64 | NKR0... | Internal check negative |
16 | 64 | NKR0... | Caller error |
20 | 64 | NKR0... | Software error |
If there is an error in command termination, the maincode contains the message code of the message output during command processing. The command return codes with the ETMRK.. maincodes occur only if the hardware unit to be reconfigured is a CPU.
Notes
If the reconfiguration job cannot be executed with FORCE=*NO within the specified maximum wait time, it is rejected with the following message:
NKR0037 DEVICE=mn MAY CURRENTLY NOT BE DETACHED
NKR0049 unit-class=mn DETACHMENT REJECTEDIn this case the operator should take one of the following actions:
Request more detailed information with the SHOW command, terminate all tasks which have reserved the device, or assign other devices.
Repeat the reconfiguration job in execution mode FORCE=*YES.
Regardless of the execution mode set, a reconfiguration job is not executed if the unit affected is highly essential for the system. The system requires the following units:
the only or the last CPU ready for operation
the only or the last console
the only or the last controller for the public disks
a disk drive for a public disk.
The “detach pending” state can be terminated by means of the appropriate command ATTACH-DEVICE or DETACH-DEVICE ..., FORCE=*YES.
A CPU may only be detached with FORCE=*YES.
The following steps are performed when detaching hardware units in the execution mode FORCE=*NO(...):
if the command is permitted, message
NKR0092
is issued,if the unit is being used neither by the system nor by user jobs, the command is executed immediately,
if the unit concerned is being used, the command is executed when the unit is no longer occupied. If execution is not possible within the period specified by WAIT, the following messages are issued:
NKR0037 DEVICE=mn MAY CURRENTLY NOT BE DETACHED
NKR0049 unit-class=mn DETACHMENT REJECTED
the command /DET <unit>,FORCE=*NO(...) can be canceled by /ATT <unit>
For all devices, connections, etc., 2 alphanumeric characters are valid as ‘mn’. In the case of disk/tape devices and controllers, ‘mn’s comprising 4 hexadecimal characters (which must be specified in alphanumeric notation without 'X') are also valid. Restrictions see the “System Installation” manual [46].
Examples
Detach channels 41, 51 and 23 as soon as possible; wait state: 5 minutes
/DETACH *CH((41,51,23)),FORCE=*NO(WAIT=5(DIM=*MIN))
Immediate unconditional detaching of channel 30
/DETACH *CH(30),FORCE=*UNCONDITIONAL-OFFLINE
Detach CPU 0
/DETACH-DEVICE UNIT=*CPU(CPU-IDENTIFIER=00) or /DET *CPU(00)