Clearing a leftover persistent reservation (PR)

Learn how to can clear a leftover persistent reservation.

Message number 6027-2202 indicates that a specified disk has a persistent reservation, which prevents the mmcrnsd command from formatting it. The following example is specific to a Linux® environment. Output on AIX® is similar but not identical.

Before trying to clear the persistent reservation, use the following instructions to verify that the disk is really intended for GPFS use. Note that in this example, the device name is specified without a prefix (/dev/sdp is specified as sdp).

  1. Display all the registration key values on the disk:
    /usr/lpp/mmfs/bin/tsprreadkeys sdp
    The system displays information similar to:
    Registration keys for sdp
    1. 00006d0000000001
    If the registered key values all start with 0x00006d, which indicates that the PR registration was issued by GPFS, proceed to the next step to verify the persistent reservation type. Otherwise, contact your system administrator for information about clearing the disk state.
  2. Display the reservation type on the disk:
    /usr/lpp/mmfs/bin/tsprreadres sdp
    The system displays information similar to:
    yes:LU_SCOPE:WriteExclusive-AllRegistrants:0000000000000000

If the output indicates a persistent reservation with type WriteExclusive-AllRegistrants, proceed to the following instructions for clearing the persistent reservation on the disk.

If the output does not indicate a persistent reservation with this type, contact your system administrator for information about clearing the disk state.

To clear the persistent reservation on the disk, follow these steps:
  1. Choose a hex value (HexValue); for example, 0x111abc that is not in the output of the tsprreadkeys command run previously. Register the local node to the disk by entering the following command with the chosen HexValue:
    /usr/lpp/mmfs/bin/tsprregister sdp 0x111abc
  2. Verify that the specified HexValue has been registered to the disk:
    /usr/lpp/mmfs/bin/tsprreadkeys sdp
    The system displays information similar to:
    Registration keys for sdp
    1. 00006d0000000001
    2. 0000000000111abc
  3. Clear the persistent reservation on the disk:
    /usr/lpp/mmfs/bin/tsprclear sdp 0x111abc
  4. Verify that the PR registration has been cleared:
    /usr/lpp/mmfs/bin/tsprreadkeys sdp
    The system displays information similar to:
    Registration keys for sdp
  5. Verify that the reservation has been cleared:
    /usr/lpp/mmfs/bin/tsprreadres sdp
    The system displays information similar to:
    no:::
The disk is now ready to use for creating an NSD.