Persistent Reserve Out (5Fh)

Persistent Reserve Out (5Fh) uses service actions to create, manage, or remove a persistent reservation.

The application client provides a registered reservation key that identifies the initiator. An application client may use the Persistent Reserve In (5Eh) command to obtain the reservation key for the initiator holding a persistent reservation. The client may use the Persistent Reserve Out command to preempt that persistent reservation.

Note:

For more information on command processing when the library has a persistent reservation, see Reservation Handling.

Service Action

00h = Register — registers or unregisters a reservation key.

01h = Reserve — creates a persistent reservation of the scope and type specified in Byte 2.

02h = Release — removes an active persistent reservation, if the initiator holds the persistent reservation.

03h = Clear — clears all persistent reservations for all initiators and reset all reservation keys to 0.

04h = Preempt — removes all reservations and registrations for the initiators associated with the service action reservation key in the parameter list.

05h = Preempt and Abort. Perform a Preempt action and terminate all commands by initiators associated with the cleared service action reservation key. This also clears any CAP locks and contingent allegiance in effect for these initiators.

06h = Register and Ignore Existing Key. Registers or unregisters a reservation key with the library.

Scope

Indicates whether a persistent reservation applies to an entire logical unit or to an element.

0h = The persistent reservation applies to the logical unit (library or partition). This is the only valid value.

Type

3h = Exclusive access. The initiator holding the persistent reservation has exclusive access. Some commands (such as Move Medium) are only allowed for the persistent reservation holder.

6h = Exclusive Access, Registrants Only. Any currently registered initiator has exclusive access. Some commands (such as Move Medium) are only allowed for registered initiators.

Parameter List Length

Always 18h (24d) bytes. The parameter data for the Persistent Reserve Out command includes all fields, even when a field is not required for the specified service action.

Persistent Reserve Out Parameter List

Reservation Key

An 8-byte value that identifies the initiator.

Service Action Reservation Key

If the service action is Register or Register and Ignore Existing Key, this field must contain the new reservation key.

If the service action is Preempt or Preempt and Abort, this field must contain the reservation key of the persistent reservation or registration being preempted.

SPEC_I_PT (Specify Initiator Ports - not supported)

Set this to 0.

ALL_TG_PT (All Target Ports - not supported)

Set this to 0.

APTPL (Activate Persist Through Power Loss - not supported)

Set this to 0.

Table 3-1 Persistent Reserve Out Service Actions and Parameters

Persistent Reserve Action Service Action Scope Type Reservation Key Service Action (SA) Res. Key SPEC_I_PT, ALL_TG_PT, and APTPL Unit Attention Notes

Register a Key

0

Ignored

Ignored

0

SA Key

0

N/A

Register a New Key

0

Ignored

Ignored

Key

SA Key

0

N/A

Unregister a Key

0

Ignored

Ignored

Key

0

0

See 1.

Reserve: Exclusive Access

1

0

3

Key

Ignored

Ignored

N/A

Reserve: Exclusive Access Registrants Only

1

0

6

Key

Ignored

Ignored

N/A

Release: Exclusive Access Reservation

2

0

3

Key

Ignored

Ignored

N/A

Release: Exclusive Access Registrants Only Reservation

2

0

6

Key

Ignored

Ignored

See 2.

Clear: Reservation and All Host Keys

3

Ignored

Ignored

Key

Ignored

Ignored

See 3.

Preempt: No Active Reservation

4

Ignored

0, 3, or 6

Key

SA Key

Ignored

See 4.

Preempt: Active Reservation

4

Ignored

3 or 6

Key

SA Key

Ignored

See 5.

Preempt and Abort: No Active Reservation

5

Ignored

0, 3, or 6

Key

SA Key

Ignored

See 4.

Preempt and Abort: Active Reservation

5

Ignored

3 or 6

Key

SA Key

Ignored

See 5.

Register and Ignore Existing Key

6

Ignored

Ignored

Ignored

SA Key

Ignored

N/A

Unregister and Ignore Existing Key

6

Ignored

Ignored

Ignored

0

0

See 1.

Unit Attention Notes

  1. If the initiator unregistering the reservation key also holds a persistent reservation, then the library releases the reservation and removes the registration key. If the initiator had an Exclusive Access Registrants Only reservation, the library sends a Reservations Released Unit Attention (06h/2Ah/04h) to all other registered initiators.
  2. When an initiator releases an Exclusive Access Registrants Only reservation, the library sends a Reservations Released Unit Attention (06h/2Ah/04h) to all other registered initiators.
  3. When an initiator requests a Clear service action, the library clears the persistent reservation (if present) and unregisters all initiators. The library sends a Reservations Preempted Unit Attention (06h/2Ah/03h) to the other registered initiators.

    Note:

    You should only clear reservations for error recovery.
  4. When an initiator requests a Preempt or Preempt and Abort service action and there is no active persistent reservation, the library unregisters all reservation keys matching the service action key. The library sends Registrations Preempted Unit Attention (06h/2Ah/05h) to the affected initiators.
  5. When an initiator requests a Preempt or Preempt and Abort service action and there is an active persistent reservation matching the service action key, the library:
    • Modifies the persistent reservation with the requesting initiator's reservation key and type. If the preempting initiator modified the persistent reservation type, the library sends a Reservations Released Unit Attention (06/2Ah/04h) all other initiators that still have a persistent registration.
    • Unregisters all other initiators with a reservation key matching the service action key and sends a Registrations Preempted Unit Attention (06h/2Ah/03h) to the affected initiators.