我通过物理移动磁盘(减去缓存磁盘)并将其导入新服务器,将 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
这就是我解决它的方法:
zpool status -g
- 复制缓存设备的 guid 并使用 zpool remove 将其删除。
这可能是也可能不是一个小错误:https://github.com/openzfs/zfs/issues/14871#issuecomment-1549424452