SCSI persistent reservations
SCSI persistent reservations control initiator access to a logical unit using registered keys and a selected reservation type.
Registration and reservation are separate operations. An initiator first registers a reservation key of up to 8 bytes, and a reservation then names one of six type codes: 1 and 3 for write exclusive and exclusive access, 5 and 6 for their registrants-only variants, and 7 and 8 for the all-registrants variants. Write Exclusive permits only the holder to write, while Write Exclusive, Registrants Only permits all registered initiators to write. [1] The scope is the LUN, not its partitions.
Persistence through power loss depends on applicable support and configuration, including the APTPL flag set at registration. Do not infer it from the word persistent. [1] Linux's simplified PR interface expects reservations to survive power loss and to cover all connections in a multipath environment, behaviors that are optional in SPC but applied automatically by Linux. [2]
Relations
- related
- I/O fencing, SCSI, Multipath I/O, Logical unit number (LUN), SCSI initiator and target, NVMe reservation
Advantages
- A surviving initiator can preempt a failed holder's reservation, and the preempt-and-abort variant also aborts outstanding commands sent over the preempted key's connections. [2]
Limitations
- Under the all-registrants types every initiator with a registered key is a reservation holder, so reasoning based on a single holder does not carry over. [2]
Citations
- Douglas Gilbert, sg3_utils: sg_persist(8), registration, reservation and APTPL semantics.
- Linux kernel documentation: Block layer support for Persistent Reservations.
Further reading
- Red Hat Enterprise Linux 6, Fence Configuration Guide 4.28: SCSI Persistent Reservations (historical guide, LUN scope).
- Storage fencing: why a lost heartbeat does not stop writes
Sources & caveats
- sg-persist and linux-pr re-read 2026-10-23 for key length, type codes, APTPL and the Linux persistence and multipath expectations.
- A companion analysis on storage fencing is listed but not used in prose.
- The multipath-nvme entry links here because the Linux PR interface expects a reservation to cover every path to the device.