Clear LINUX shared disk SCSI-3 PGR lock

You can see error message like below in system logs. So, Removing SCSI-3 PGR lock can be needed.

sd 1:0:0:0: reservation conflict

Ø  sg3_utils package must be installed first.

Ø  Check if there is lock

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

            If there is lock, it will write the KEY with Key=0Xn

Ø  Prepare for key cleaning

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

 

This can give below message but it is not an error, we can continue.

persistent reserve out: scsi status: Reservation Conflict

PR out: command failed

Ø  Below comman removes the key.

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

 

Ø  Control again and you wont see KEY again. Instead, below message must appear.
/usr/bin/sg_persist --in --no-inquiry --read-reservation --device=device-name
PR generation=0xnn, there is NO reservation held

 

 

Please feel free to communicate by bulent.yucesoy@gmail.com