IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [TrueNAS]替换系统盘阵列中的坏盘

    罗佳(博主)发表于 2023-11-06 09:45:18
    love 0

    TrueNAS中的系统盘池不能在GUI中直接操作,所以需要敲点命令来替换坏盘,这里做个记录

    首先查看zfs状态

    # zpool status
     pool: boot-pool
     state: DEGRADED
    status: One or more devices are faulted in response to persistent errors.
            Sufficient replicas exist for the pool to continue functioning in a
            degraded state.
    action: Replace the faulted device, or use 'zpool clear' to mark the device
            repaired.
      scan: scrub repaired 0B in 00:00:39 with 0 errors on Sat Nov  4 03:45:40 2023
    config:
    
            NAME        STATE     READ WRITE CKSUM
            boot-pool   DEGRADED     0     0     0
              mirror-0  DEGRADED     0     0     0
                sdc3    FAULTED      2    17     0  too many errors
                sdd3    ONLINE       0     0     0

    可以看到是sdc这块盘不行了,所以我们要替换它。

    首先把它offline:

    zpool offline boot-pool sdc3

    然后把这块盘拔了,插进新盘,去web gui的磁盘页面看看新盘获得的盘号叫什么,我这里分配到了sde,所以接下来使用sde替换sdc3

    zpool replace -f boot-pool sdc3 sde

    由于boot-pool的内容其实很少,所以稍微等一会儿就同步好了,期间可以继续用`zpool status`查看同步状态。



沪ICP备19023445号-2号
友情链接