Query page 0x83 of vital product data

Does this device support reservations?

[root@gfs-a24c-01 /]# sg_inq --vpd -p 0x83 /dev/sda
VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 20
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 6, IEEE Company_id: 0x6016
      Vendor Specific Identifier: 0x5e203f00
      Vendor Specific Identifier Extension: 0xccbbc3f19b08e611
      [0x600601605e203f00ccbbc3f19b08e611]
  Designation descriptor number 2, descriptor length: 20
    designator_type: vendor specific [0x0],  code_set: Binary
    associated with the addressed logical unit
      vendor specific:
        00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  Designation descriptor number 3, descriptor length: 8
    designator_type: Relative target port,  code_set: Binary
    associated with the target port
      Relative target port: 0x1
  Designation descriptor number 4, descriptor length: 8
    designator_type: Target port group,  code_set: Binary
    associated with the target port
      Target port group: 0x1

Query any existing persistent reservations

[root@gfs-a24c-01 /]# sg_persist -r /dev/sda
  DGC       VRAID             0533
  Peripheral device type: disk
  PR generation=0x9, Reservation follows:
    Key=0x100000000000000
    scope: LU_SCOPE,  type: Exclusive Access, registrants only

Release an existing reservation

You’ll need to match the reservation type in prout-type:

[root@gfs-a24c-02 ~]# sg_persist -r /dev/sda
  DGC       VRAID             0533
  Peripheral device type: disk
  PR generation=0xb, Reservation follows:
    Key=0x100000000000000
    scope: LU_SCOPE,  type: Exclusive Access, registrants only
[root@gfs-a24c-02 ~]# sg_persist --out --release --param-rk=0x100000000000000 --prout-type=6 /dev/sda
  DGC       VRAID             0533
  Peripheral device type: disk
[root@gfs-a24c-02 ~]# sg_persist -r /dev/sda
  DGC       VRAID             0533
  Peripheral device type: disk
  PR generation=0xb, there is NO reservation held

Note, you’ll need to release the reservation from the same initiator, otherwise perform a register-move. The sg_persist man page is helpful here..