1. Solaris 查看zfs存储池的状态

通过 zpool status -x 命令请求快速概览池健康状态的最简单方法。

例子:

# zpool status -x
all pools are healthy

我们可以通过指定池名称来列出特定池的池状态,如下所示:
例子:

# zpool status -x tank
pool 'tank' is healthy
如何在 Solaris 中检查 zpool 状态

这篇文章描述了一些检查 ZFS 池健康状况的基本命令。

欢迎 on it road

2. 详细的健康状况

我们可以通过使用 -v 选项查看池状态是否为 ONLINE 来请求更详细的运行状况摘要。

处于 ONLINE 状态的池示例。

# zpool status -v tank
    pool: tank
   state: ONLINE
  scrub: none requested
  config: 
    NAME        STATE     READ WRITE CKSUM
    tank        ONLINE       0     0     0
      mirror    ONLINE       0     0     0
        c1t0d0  ONLINE       0     0     0
        c1t1d0  ONLINE       0     0     0
errors: No known data errors

处于 DEGRADED 状态的池示例。

# 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: none requested
        config:

              NAME        STATE     READ WRITE CKSUM
        tank        DEGRADED     0     0     0
          mirror    DEGRADED     0     0     0
            c1t0d0  FAULTED      0     0     0 cannot open
            c1t1d0  ONLINE       0     0     0
errors: No known data errors

处于 ONLINE 状态的池运行良好,没有检测到任何问题。
我们可以运行 zpool Scrub [poolname] 来检查数据完整性。

处于 DEGRADED 状态的池继续运行,但我们可能无法实现与池联机时相同级别的数据冗余或者数据吞吐量。

处于 FAULTED 或者 UNAVAIL 状态的池通常无法访问,但有时可能读取成功,但写入失败。

日期:2020-09-17 00:15:04 来源:oir作者:oir