11

A few days ago, I noticed that the ZFS pool on my home server had started reslivering a disk by itself but was no longer making any progress. The disk had some SMART errors (but did not consider itself failed), so I decided to replace it with a spare. I did that, but my spare disk is now generating a large number of DMA_WRITE errors, and the reslivering from the replace is restarting once it gets to 10% or so.

I now want to temporarily replace both the original disk and the spare disk with a USB disk. I've stopped the resliver with "zpool scrub -s tank". However, both the disks are still listed as "replacing" and won't allow another replace, and I can't seem to get them out of that state.

How can I stop/cancel a zpool replace before it's completed?

I am using FreeBSD 8.1-RELEASE with a 5-disk RAIDZ array.

3 Answers 3

9

So, I just recently had an issue where I was replacing a drive, and as soon as reslivering started, the new drive bombed out.

I yanked and replaced w/ the previous drive (still worked, just was increasing capacity), but still had the "replacing" bits when I ran zpool status.

Here's what got me back to normal:

zpool detach mypoolname /dev/disk/by-id/scsi-SATA_XYZ

All seems well now.

4
  • 1
    I had the same "replacing bits" in zpool status. I did a zpool detach /dev/ada0 (since the message was "was /dev/ada0") and everything went fine.
    – JB.
    Mar 19, 2013 at 20:41
  • it´s old thread, but work! Many Thanks! Oct 24, 2019 at 18:10
  • 2
    Are you detaching the (previously) new disk?
    – Dan Bolser
    Jan 15, 2021 at 15:21
  • 1
    was SATA-XYZ the old drive, or the replacement? This is NOT clear in the answer. Dec 9, 2021 at 19:15
3

I just did a detach like this and it worked !

zpool detach storage c9t24d1

And c9t24d1 was a hot spare that I just add to one of my mirror because I tough we had no drive available to replace a failed one.

After putting a new drive in my spool before the hot spare finish resilvering, I just detach my spare to stop the silvering process and it work.

After that I replace my bad drive with the new one. For us one silvering process is the max that we can have in our pool of 24 drives. With 2 silvering process happening simultaneously its hurting to much our users.

Hope this can help others in the same situation.

2

According the docs:

An in-progress spare replacement can be cancelled by detaching the hot spare.

It sounds like you did a manual replace but detching the new disk might work the same.

1
  • 1
    I did do a manual replace. I've tried removing the spare (it's not a hot spare), and it remained in replace mode.
    – Kaypro II
    Mar 1, 2011 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .