Remove SCSI-3 PR under RHEL

If you are working with cluster file system, one time or another you will need to remove SCSI-3 PR (SCSI-3 persistent reservations).

  • To verify if your disk has SCSI-3 PR.
# /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=/dev/disk/by-id/wwn-0x60060480000290100134533031373138
PR generation=0xnn, Reservation follows:
 Key=0x1
 scope: LU_SCOPE, type: Write Exclusive, registrants only

The out put of the above command will display all SCSI-3 PR, you will need to remove one by one manually.

  • You will need to prepare and remove the SCSI-3 PR in two steps.
# /usr/bin/sg_persist --out --no-inquiry --register --param-sark=0x1 --device=/dev/disk/by-id/wwn-0x60060480000290100134533031373138
  • Remove the SCSI-3 PR.
# /usr/bin/sg_persist --out --no-inquiry --clear --param-rk=0x1 --device=/dev/disk/by-id/wwn-0x60060480000290100134533031373138
  • Verify if the SCSI-3 PR has been cancelled.
# /usr/bin/sg_persist --in --no-inquiry --read-reservation --device=/dev/disk/by-id/wwn-0x60060480000290100134533031373138
PR generation=0xnn, there is NO reservation held

# /usr/bin/sg_persist --in --no-inquiry --read-key --device=/dev/disk/by-id/wwn-0x60060480000290100134533031373138
PR generation=0xnn, there is NO reservation held

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s