What are SCSI Reservations and SCSI Persistent Reservations?

SCSI reservations are used to gain access to a LUN by denying access to other initiators.

SCSI-2 reservation
Allows an initiator to reserve and release a SCSI device.
Done with SCSI reserve and release commands.
The release can happen when there is a SCSI bus reset. During error recoevry also SCSI Bus reset is performed..
Only works with single path.
SPC-2 supports both SCSI-2 and SCSI-3 reservations in a mutually exclusive way.
All subsequent SCSI persistent and SCSI-2 reservations will fail when already reserved via SCSI-2 reservation command.
SPC-3 deprecates classic reserve and release machanism over SCSI-3 method.

SCSI-3 reservation named persistent reservations.
Reservation is persistent across SCSI bus reset.
Done via SCSI Persist reserve OUT and IN commands.
supports reservations with multipath and multiple nodes accessing the same SCSI device.
uses the concept of registration and reservation.
Persistent reservations allow multiple clients(initiators) to communicate with a tracking multiple
initiator to target relationship called I_T nexus.
Actions performed are
-Initiator will register to target and creates a new registration key
-Initiator will read the existing registrations and reservations .
-Intiator can alter existing registrations.
-Initiator issues reserve actions to lock on a specific LUN
-Initiator releases the lock when done and releases the regostration also inf no more required.

How to reslve SCSI-2 reservation conflicts from a host?
Host can clear with a lun reset or target reset.

Warning: A target reset will abort all commands on all LUNs mapped to the initiator that issued this command.
It will also abort commands from other initiators to the LUNs that are accessed by the initiator from which
the abort was initiated.

Source: What are SCSI Reservations and SCSI Persistent Reservations?

Understanding SCSI

  • Small computer systems interface.
  • Upto 16 devices can be daisy chained.
  • Fast SCSI, Ultra SCSI, Ultra Wide SCSI, Ultra2 SCSI,Ultra3 SCSI, Ultra-320 SCSI, Ultra-640 SCSI, iSCSI.
  • Narrow bus(8 devices) vs Wide Bus (16 devices).
  • Requires end device termination.
  • Each SCSI device in a single bus contains unique SCSI ID.
  • Logical Unit Number(LUN) assigned to seperate drives under a storage array.