1

我的 ZFS 池中有两个故障磁盘,我用zpool replace. 如何识别故障磁盘以便进行物理更换?

以下是我在损坏的磁盘上zpool status运行之前和之后的输出。zpool detach

之前zpool detach

  pool: mypool
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Tue Jun  7 11:26:56 2016
        123M scanned out of 91,8T at 5,84M/s, (scan is slow, no estimated time)
        5,23M resilvered, 0,00% done
config:

        NAME              STATE     READ WRITE CKSUM
        myp       DEGRADED     0     0     0
          raidz3-0        ONLINE       0     0     0
            da0           ONLINE       0     0     0
            da1           ONLINE       0     0     0
            da2           ONLINE       0     0     0
            da3           ONLINE       0     0     0
            da16          ONLINE       0     0     0
            da17          ONLINE       0     0     0
            da18          ONLINE       0     0     0
            da19          ONLINE       0     0     0
            da32          ONLINE       0     0     0
            da33          ONLINE       0     0     0
            da34          ONLINE       0     0     0
          raidz3-1        ONLINE       0     0     0
            da4           ONLINE       0     0     0
            da5           ONLINE       0     0     0
            da6           ONLINE       0     0     0
            da7           ONLINE       0     0     0
            da20          ONLINE       0     0     0
            da21          ONLINE       0     0     0
            da22          ONLINE       0     0     0
            da23          ONLINE       0     0     0
            da36          ONLINE       0     0     0
            da37          ONLINE       0     0     0
            da38          ONLINE       0     0     0
          raidz3-2        DEGRADED     0     0     0
            da8           ONLINE       0     0     0
            da9           ONLINE       0     0     0
            da10          ONLINE       0     0     0
            da11          ONLINE       0     0     0
            spare-4       REMOVED      0     0     0
              2131739493  REMOVED      0     0     0  was /dev/da24
              da35        ONLINE       0     0     0  (resilvering)
            da25          ONLINE       0     0     0
            da26          ONLINE       0     0     0
            da27          ONLINE       0     0     0
            da41          ONLINE       0     0     0
            da42          ONLINE       0     0     0
            da40          ONLINE       0     0     0
          raidz3-3        DEGRADED     0     0     0
            da12          ONLINE       0     0     0
            da13          ONLINE       0     0     0
            da14          ONLINE       0     0     0
            da15          ONLINE       0     0     0
            da28          ONLINE       0     0     0
            da29          ONLINE       0     0     0
            da30          ONLINE       0     0     0
            da31          ONLINE       0     0     0
            spare-8       REMOVED      0     0     0
              1333723008  REMOVED      0     0     0  was /dev/da44
              da39        ONLINE       0     0     0  (resilvering)
            da45          ONLINE       0     0     0
            da46          ONLINE       0     0     0
        logs
          ada3            ONLINE       0     0     0
        cache
          ada2            ONLINE       0     0     0
        spares
          1693614993      INUSE     was /dev/da35
          2127061040      INUSE     was /dev/da39
          da43            AVAIL
          da47            AVAIL

errors: No known data errors

之后zpool detach

  pool: mypool
 state: ONLINE
  scan: scrub repaired 0 in 66h29m with 0 errors on Mon Jul 25 18:29:18 2016
config:

    NAME        STATE     READ WRITE CKSUM
    mypool  ONLINE       0     0     0
      raidz3-0  ONLINE       0     0     0
        da0     ONLINE       0     0     0
        da1     ONLINE       0     0     0
        da2     ONLINE       0     0     0
        da3     ONLINE       0     0     0
        da16    ONLINE       0     0     0
        da17    ONLINE       0     0     0
        da18    ONLINE       0     0     0
        da19    ONLINE       0     0     0
        da32    ONLINE       0     0     0
        da33    ONLINE       0     0     0
        da34    ONLINE       0     0     0
      raidz3-1  ONLINE       0     0     0
        da4     ONLINE       0     0     0
        da5     ONLINE       0     0     0
        da6     ONLINE       0     0     0
        da7     ONLINE       0     0     0
        da20    ONLINE       0     0     0
        da21    ONLINE       0     0     0
        da22    ONLINE       0     0     0
        da23    ONLINE       0     0     0
        da36    ONLINE       0     0     0
        da37    ONLINE       0     0     0
        da38    ONLINE       0     0     0
      raidz3-2  ONLINE       0     0     0
        da8     ONLINE       0     0     0
        da9     ONLINE       0     0     0
        da10    ONLINE       0     0     0
        da11    ONLINE       0     0     0
        da35    ONLINE       0     0     0
        da25    ONLINE       0     0     0
        da26    ONLINE       0     0     0
        da27    ONLINE       0     0     0
        da41    ONLINE       0     0     0
        da42    ONLINE       0     0     0
        da40    ONLINE       0     0     0
      raidz3-3  ONLINE       0     0     0
        da12    ONLINE       0     0     0
        da13    ONLINE       0     0     0
        da14    ONLINE       0     0     0
        da15    ONLINE       0     0     0
        da28    ONLINE       0     0     0
        da29    ONLINE       0     0     0
        da30    ONLINE       0     0     0
        da31    ONLINE       0     0     0
        da39    ONLINE       0     0     0
        da45    ONLINE       0     0     0
        da46    ONLINE       0     0     0
    logs
      ada3      ONLINE       0     0     0
    cache
      ada2      ONLINE       0     0     0
    spares
      da43      AVAIL   
      da47      AVAIL   

errors: No known data errors

  pool: zroot
 state: ONLINE
  scan: scrub repaired 0 in 0h1m with 0 errors on Wed Feb 11 10:27:32 2015
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada0p3  ONLINE       0     0     0
        ada1p3  ONLINE       0     0     0

errors: No known data errors
4

1 回答 1

-1

您需要确定您的控制器和机箱托架。对于 FreeBSD ,这个关于 serverfault 的答案似乎很有帮助。如果您有 LSI SAS 控制器,则可以找到带有sas2ircu的机箱和磁盘的序列号(如果机箱支持,则闪烁机箱)。

对于未来,我建议将磁盘供应商、类型、序列号、机箱名称/编号和控制器名称/端口记录在配置管理数据库中(或者只是在一张纸上),因为没有这样会更快查找它,尤其是大型数组。

在 FreeBSD 上也可以使用 WWN(全球名称)而不是编号 da0、da1、...来命名您的磁盘,这意味着您可以直接查看哪个磁盘有问题,然后使用简单的 Ctrl+C/ 查找它们Ctrl+F。当然,如果你愿意,你也可以编写脚本。

于 2016-07-29T11:18:10.493 回答