Persistent reserve, a off topic question.

34 views
Skip to first unread message

di9...@gmail.com

unread,
May 5, 2016, 4:38:09 AM5/5/16
to libiscsi

Hey


I try to understand the mechanics of persistent reserve in SPC-3.


My problem is off topic and not related to libiscsi but the number of people who know SCSI and

SAM/SPC/SBC inside out is not that many. If you feel there is better spot for this question just kindly

point me in the right direction.


My job is to create a SCSI target and right now I am working with persistent reserve. But I find SPC and

related documents a bit harsh to on the mind so to speak and not so clear as I would wish. Thus I would

very much like to know that I got it.


- A IT Nexus can have at most ONE persistent reservation key at any time.


- A registered IT Nexus is a nexus that have a reservation key.


- Adding a new key to a IT Nexus that have a key will replace the old key with the new key.


- Multiple IT Nexuses may share the same reservation key, no conflict since the IT Nexus together

  with the reservation key form a unique identifier.


- A registration contains of one reservation key and one or more IT Nexuses.


- If a registration is removed, the reservation key and all IT Nexuses in the registration is removed.

  The IT Nexuses is now unregistered.


- A reservation or a release of a reservation is always done on the IT Nexus that issued the reserve

  and release service action.


Is this correct ?


Thanks for your time.

// Jim Gunnarsson

Lee Duncan

unread,
May 6, 2016, 1:51:13 PM5/6/16
to libi...@googlegroups.com
Hi Jim:

On May 5, 2016, at 1:38 AM, di9...@gmail.com wrote:

Hey


I try to understand the mechanics of persistent reserve in SPC-3.


Many before you have tried and failed. :)

Have you looked at my persistent reservation document:  http://gonzoleeman.net/documents/scsi-3-pgr-tutorial-v10.pdf


My problem is off topic and not related to libiscsi but the number of people who know SCSI and

SAM/SPC/SBC inside out is not that many. If you feel there is better spot for this question just kindly

point me in the right direction.


My job is to create a SCSI target and right now I am working with persistent reserve. But I find SPC and

related documents a bit harsh to on the mind so to speak and not so clear as I would wish. Thus I would

very much like to know that I got it.


This is actually a really large task. I know, I’ve helped do this before. There are endless side-cases that are … not well defined, and which almost take a lawyer if you are going straight from the specification. :)

Just to make a SCSI-2 functional target is not trivial, but then adding group reservations is a *lot* harder. Have you looked at some of the software iSCSI targets, like iet or tgt? These all have the same issues, i.e. how to look like a valid SCSI target, including code to support SCSI-3 PGR (persistent group reservations).

Did you know that the libiscsi tests include a set on persistent reservations (that I added)?


- A IT Nexus can have at most ONE persistent reservation key at any time.


It has been a while since I worked on this stuff, but I’m pretty sure that is incorrect.


- A registered IT Nexus is a nexus that have a reservation key.


Yes, registering is the act of registering a key.


- Adding a new key to a IT Nexus that have a key will replace the old key with the new key.


From a single ITN, yes.


- Multiple IT Nexuses may share the same reservation key, no conflict since the IT Nexus together

  with the reservation key form a unique identifier.


Yes, they could, but that would be dumb. Each initiator should have it’s own key, I believe. But much depends on the reservation type.


- A registration contains of one reservation key and one or more IT Nexuses.


Not really.


- If a registration is removed, the reservation key and all IT Nexuses in the registration is removed.

  The IT Nexuses is now unregistered.


Depends on the registration type.


- A reservation or a release of a reservation is always done on the IT Nexus that issued the reserve

  and release service action.


Depends on the registration type.


Is this correct ?


Thanks for your time.

// Jim Gunnarsson



Please see my document. Then you can email me directly if you have more questions.

— 
Lee Duncan
SUSE Labs

Reply all
Reply to author
Forward
0 new messages