Red Hat Training

A Red Hat training course is available for RHEL 8

7.6. サーバーでの pNFS SCSI 予約の解放

この手順では、NFS サーバーが SCSI デバイスを維持している永続的な予約を解放します。これにより、pNFS SCSI をエクスポートする必要がなくなったら、SCSI デバイスを別の目的で使用できるようになります。

サーバーから予約を削除する必要があります。別の IT Nexus から削除することはできません。

前提条件

  • 以下のコマンドで、sg3-utils パッケージがインストールされている。

    # yum install sg3_utils

手順

  1. サーバーで、既存の予約をクエリーします。

    # sg_persist --read-reservation path-to-scsi-device

    例7.3 /dev/sda での予約のクエリー

    # *sg_persist --read-reservation /dev/sda*
    
      LIO-ORG   block_1           4.0
      Peripheral device type: disk
      PR generation=0x8, Reservation follows:
        Key=0x100000000000000
        scope: LU_SCOPE,  type: Exclusive Access, registrants only
  2. サーバーにある既存の登録を削除します。

    # sg_persist --out \
                 --release \
                 --param-rk=reservation-key \
                 --prout-type=6 \
                 path-to-scsi-device

    例7.4 /dev/sda にある予約の削除

    # sg_persist --out \
                 --release \
                 --param-rk=0x100000000000000 \
                 --prout-type=6 \
                 /dev/sda
    
      LIO-ORG   block_1           4.0
      Peripheral device type: disk

関連情報

  • sg_persist(8) man ページ