Re: Unable to replace drive in raidz1

From: Chris Ross <cross+freebsd_at_distal.com>
Date: Fri, 06 Sep 2024 18:06:32 UTC

> On Sep 6, 2024, at 13:59, Alan Somers <asomers@freebsd.org> wrote:
> 
> On Fri, Sep 6, 2024 at 11:50 AM Chris Ross <cross+freebsd@distal.com> wrote:
>> % sudo zpool replace tank da3 da10
>> cannot replace da3 with da10: already in replacing/spare config; wait for completion or use 'zpool detach'
>> 
>> 
> 
> If there is no label on da10, and "zpool status" doesn't show any
> spares, then I don't know what the problem is.  It's possible that
> /sbin/zpool is printing an incorrect error message; it's fairly
> notorious for that.  You could try to debug it.  Other wild guesses
> include:
> * maybe da3 is the disk with the out-of-date label.  You could try
> physically removing it before doing "zpool replace"

Well, there is a problem there.  /dev/da3, right now, is one of
the disks in zraid1-1, the second set.  It’s working there, listed
as diskid/???

How can I map the diskid’s listed to the underlying device?
either by serial number or da#…

> * Since exported pools can't have active spares, you could try
> exporting the pool and then reimporting it.

Okay.  Lukcily this is _not_ a root on ZFS system, so that should
be doable.  Hopefully there aren’t significant risks there?

Can I tell ZFS to reconsider the labels in the first zraid1?
since it’s still reporting da3 as missing/failed, and that kernel
dev is not what it thinks that is…

            - Chris