Photo by Ross Findon / Unsplash

Change failed boot drive in ZFS pool on Proxmox

Self Hosted 自托管
/ Proxmox / ZFS
Aug 6, 2023 ~

Proxmox上面的用来启动系统的data pool里面发现一个坏掉的磁盘。本文记录一下更换磁盘的操作流程。

前提

我这里的Proxmox上面,boot drive用的是两个旧的笔记本上面拆下来的2.5英寸HDD。性能什么的自然是惨不忍睹,但是HDD一个好处是,坏的时候,是一种 gradually的坏,而SSD可能坏掉的时候就是彻底崩溃。

这个datapool是在安装Proxmox的时候就创建的。是ZFS Mirror。按照Proxmox的习惯,这个pool的名字都是 rpool.

过程

zpool status rpool 发现有坏盘:

root@pve0:~# zpool status rpool
  pool: rpool
 state: DEGRADED
status: One or more devices has experienced an unrecoverable error.  An
        attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
        using 'zpool clear' or replace the device with 'zpool replace'.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
  scan: scrub repaired 2.88M in 00:25:09 with 0 errors on Wed Aug  2 14:42:06 2023
config:

        NAME                                      STATE     READ WRITE CKSUM
        rpool                                     DEGRADED     0     0     0
          mirror-0                                DEGRADED     0     0     0
            ata-ST500LT012-9WS142_XXXXXX-part3  ONLINE       0     0     0
            ata-ST95005620AS_XXXXXX-part3       DEGRADED     0     0    96  too many errors

官方的文档在这里:

ZFS on Linux - Proxmox VE

决定用闲置的 500GB的Crucial MX500来顶替坏掉的HDD。并没有什么特别的理由,只是因为手头500GB的SATA SSD只有这么一块。当前MX500的设备地址是/dev/sde,而rpool里面依旧正常的那个盘是 /dev/sda。

标签