zpoolで利用できないキャッシュデバイスを削除する方法は?

zpoolで利用できないキャッシュデバイスを削除する方法は?

ディスクを物理的に移動し(キャッシュディスクを除く)、新しいサーバーにインポートし、zpoolをあるサーバーから別のサーバー(arch linux)に移動しました。うまく動作しますが、古いキャッシュデバイスはまだ利用できないとマークされています。

zpool status storage
  pool: storage
 state: ONLINE
status: One or more devices could not be used because the label is missing or
        invalid.  Sufficient replicas exist for the pool to continue
        functioning in a degraded state.
action: Replace the device using 'zpool replace'.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
  scan: scrub repaired 0B in 08:59:05 with 0 errors on Sun Apr 23 08:59:06 2023
config:

        NAME                                    STATE     READ WRITE CKSUM
        storage                                 ONLINE       0     0     0
          raidz1-0                              ONLINE       0     0     0
            sda2                                ONLINE       0     0     0
            sdb2                                ONLINE       0     0     0
            sdc2                                ONLINE       0     0     0
            sdd2                                ONLINE       0     0     0
        cache
          f7a3305b-ce48-11ea-bdee-77fbe5732e17  UNAVAIL      0     0     0

errors: No known data errors

交換せずに取り除きたいのですが、削除と分離は機能しません。また、プールのエクスポートと再インポートを試みました。

sudo zpool remove storage f7a3305b-ce48-11ea-bdee-77fbe5732e17
cannot remove f7a3305b-ce48-11ea-bdee-77fbe5732e17: no such device in pool

ベストアンサー1

これが私が解決した方法です。

  1. zpool status -g
  2. キャッシュデバイスのGUIDをコピーし、zpool Removeを使用して削除します。

これは小さなバグかもしれません。https://github.com/openzfs/zfs/issues/14871#issuecomment-1549424452

おすすめ記事