如果所有池都在线且一切正常,信息将显示:“all pools are healthy”(所有池都健康)。
如果出现问题,例如磁盘处于离线状态,池的状态将显示如下:
pool: storage
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using ‘zpool online’ or replace the device with
zpool replace.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
storage DEGRADED 0 0 0
raidz1 DEGRADED 0 0 0
da0 ONLINE 0 0 0
da1 OFFLINE 0 0 0
da2 ONLINE 0 0 0
errors: No known data errors
“OFFLINE” 表示管理员使用以下命令将 da1 离线:
# zpool offline storage da1
现在关闭计算机并更换 da1。启动计算机后,将 da1 重新加入池中:
# zpool replace storage da1
接下来,再次检查状态,这次不使用参数 -x,显示所有池:
# zpool status storage
pool: storage
state: ONLINE
scrub: resilver completed with 0 errors on Fri Nov 4 11:12:03 2022
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1 ONLINE 0 0 0
da0 ONLINE 0 0 0
da1 ONLINE 0 0 0
da2 ONLINE 0 0 0
errors: No known data errors