Hitachi

For Linux(R) (x86) Systems HA Monitor Cluster Software


7.5.12 Canceling SCSI reservation for shared disk

This subsection explains how to cancel SCSI reservation for shared disk. Do not perform this procedure if not instructed to do so in the error handling procedures.

Only the superuser can cancel reservations. You can perform this procedure on any host. The procedure is the same regardless of whether the configuration is a single-path configuration, a VMware ESXi-based virtualization environment, or a redundant configuration with multipath software.

To cancel SCSI reservation for shared disk:

  1. Verify that the shared disk has been reserved.

    The following shows how to do this:

    # /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=device-name
    Legend:

    device-name: This is the value indicated in the KAMN725-W message. In a single-path configuration, or in a VMware ESXi-based virtualization environment (where DMMP is not used), this is a symbolic link, and in a redundant configuration with multipath software, it is a physical device. If the device name displayed in the KAMN725-W message is followed by a path name, this is the path name.

    The following example specifies /dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065 as the device name.

    Example
    # /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=/dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065
    Result:

    If the message shown below is displayed, check that 0x1 matches the key displayed in the KAMN725-W message.

    PR generation=0xnn, Reservation follows:
      Key=0x1
      scope: LU_SCOPE,  type: Write Exclusive, registrants only

    If the key does not match the key displayed in the KAMN725-W message or the following message is displayed, check and, if necessary, revise the specified device name, and then re-execute the command.

    PR generation=0xnn, there is NO reservation held
  2. Prepare to cancel reservations.

    The following shows how to prepare:

    # /usr/bin/sg_persist --out --no-inquiry --register --param-sark=key --device=device-name
    Legend:

    key, device-name: This is the value indicated in the KAMN725-W message. In a single-path configuration, or in a VMware ESXi-based virtualization environment (where DMMP is not used), this is a symbolic link, and in a redundant configuration with multipath software, it is a physical device. If the device name displayed in the KAMN725-W message is followed by a path name, this is the path name.

    The following example specifies /dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065 as the device name.

    Example
    # /usr/bin/sg_persist --out --no-inquiry --register --param-sark=0x1 --device=/dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065

    If nothing is displayed after execution, the preparation has been completed.

    Note that the message shown below might be displayed. In this case also, the preparation has been completed. Continue with cancellation of reservation.

    persistent reserve out: scsi status: Reservation Conflict
    PR out: command failed
  3. Cancel the reservation.

    The following shows how to cancel the reservation:

    # /usr/bin/sg_persist --out --no-inquiry --clear --param-rk=key --device=device-name
    Legend:

    key, device-name: This is the value indicated in the KAMN725-W message. In a single-path configuration, or in a VMware ESXi-based virtualization environment (where DMMP is not used), this is a symbolic link, and in a redundant configuration with multipath software, it is a physical device. If the device name displayed in the KAMN725-W message is followed by a path name, this is the path name.

    The following example specifies /dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065 as the device name.

    Example
    # /usr/bin/sg_persist --out --no-inquiry --clear --param-rk=0x1 --device=/dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065

    If nothing is displayed after execution, the reservation has been cancelled successfully.

  4. Verify that the reservation has been cancelled.

    The following shows how to verify reservation cancellation:

    # /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=device-name
    # /usr/bin/sg_persist --in --no-inquiry --read-keys --device=device-name
    Legend:

    device-name: This is the value displayed in the KAMN725-W message. In a single-path configuration, or in a VMware ESXi-based virtualization environment (where DMMP is not used), this is a symbolic link, and in a redundant configuration with multipath software, it is a physical device.

    The following example specifies /dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065 as the device name.

    Example
    # /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=/dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065
    # /usr/bin/sg_persist --in --no-inquiry --read-keys --device=/dev/disk/by-id/scsi-360060e8010462fe004f2b6ae00000065
    Result:
    PR generation=0xnn, there is NO reservation held
    PR generation=0xnn, there are NO registered reservation keys

    If the above messages are displayed, the reservation has been cancelled. If these messages are not displayed, check the steps beginning with step 1 and then re-execute them.