使用 -v 选项可以请求更详细的运行状况摘要。例如:
# zpool status -v tank pool: tank state: DEGRADED status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using 'zpool online'. see: http://www.sun.com/msg/ZFS-8000-2Q scrub: scrub completed after 0h0m with 0 errors on Wed Jan 20 15:13:59 2010 config: NAME STATE READ WRITE CKSUM tank DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 c1t0d0 ONLINE 0 0 0 c1t1d0 UNAVAIL 0 0 0 cannot open errors: No known data errors |
此输出显示了池处于其当前状态的原因的完整说明,其中包括问题的易读说明,以及指向知识文章(用于了解更多信息)的链接。每篇知识文章都提供了有关从当前问题恢复的最佳方法的最新信息。使用详细的配置信息,您可以确定哪个设备已损坏以及如何修复池。
在以上示例中,故障设备应该被替换。替换该设备后,请使用 zpool online 命令使设备联机。例如:
# zpool online tank c1t0d0 Bringing device c1t0d0 online # zpool status -x all pools are healthy |
如果启用了 autoreplace 属性,则您可能不必使被替换的设备联机。
如果池包含脱机设备,则命令输出将标识有问题的池。例如:
# zpool status -x pool: tank 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: resilver completed after 0h0m with 0 errors on Wed Jan 20 15:15:09 2010 config: NAME STATE READ WRITE CKSUM tank DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 c1t0d0 ONLINE 0 0 0 c1t1d0 OFFLINE 0 0 0 48K resilvered errors: No known data errors |
READ 和 WRITE 列提供了在设备上出现的 I/O 错误的计数,而 CKSUM 列则提供了在设备上出现的无法更正的校验和错误的计数。这两种错误计数指示可能的设备故障,并且需要执行更正操作。如果针对顶层虚拟设备报告了非零错误,则表明部分数据可能无法访问。
errors: 字段标识任何已知的数据错误。
在以上示例输出中,脱机设备不会导致数据错误。
有关诊断和修复故障池和数据的更多信息,请参见第 11 章。