ZFS - How do I stop resilvering a degraded drive and replace it with a cold spare?

J-dub

Member
Dec 20, 2023
43
12
13
Replacement HDD gets here tomorrow. In the mean time I'd like to save the mirrored good drive from working overtime to resilver the failing drive. I also don't understand how to swap the new drive with the old drive, since I don't have any open drive bays to add the new drive to the pool, without removing the failing drive first (all the commands I've found have new added to the pool first, then remove the old drive).

Can you help?

Code:
root: zpool status rpool -v

  pool: rpool
 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 Thu Feb 19 11:32:09 2026
        1.27T / 24.2T scanned, 119G / 23.3T issued at 118M/s
        119G resilvered, 0.50% done, 2 days 09:16:43 to go
config:

        NAME                                                 STATE     READ WRITE CKSUM
        rpool                                                DEGRADED     0     0     0
          mirror-0                                           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG30Z3K-part3           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG6PJ6K-part3           ONLINE       0     0     0
          mirror-1                                           DEGRADED     0     0     0
Bad --->    ata-WDC_WUH722020ALE604_2LG6MV4F-part3           DEGRADED     2     0     1  too many errors
            ata-WDC_WUH722020ALE604_2LG5VR3K-part3           ONLINE       0     0     0  (resilvering)
          mirror-2                                           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG6HVRK-part3           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG6GNUK-part3           ONLINE       0     0     0
          mirror-3                                           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG348DH-part3           ONLINE       0     0     0
            ata-WDC_WUH722020ALE604_2LG6MYDK-part3           ONLINE       0     0     0
        special
          mirror-5                                           ONLINE       0     0     0
            nvme-Micron_7450_MTFDKBA960TFR_233442BFDD5F      ONLINE       0     0     0
            nvme2n1                                          ONLINE       0     0     0
        logs
          nvme-INTEL_SSDPF21Q400GB_PHAL1265001Q400AGN-part1  ONLINE       0     0     0
        cache
          nvme-INTEL_SSDPF21Q400GB_PHAL1265001Q400AGN-part2  ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:
Code:
root: zpool detach rpool /dev/disk/by-id/ata-WDC_WUH722020ALE604_2LG6MV4F-part3
cannot detach /dev/disk/by-id/ata-WDC_WUH722020ALE604_2LG6MV4F-part3: no valid replicas
 
Last edited:
dont worry about attaching/detaching it. simply remove and replace it.

edit- DONT PULL IT YET. there's a resilver in progress; even though the disk is bad, the vdev partner is not in a "complete" state. let it finish resilver, and THEN replace the bad drive.
 
Last edited: