Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2024 12:10:22 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Chris Ross <cross+freebsd@distal.com>
Cc:        mike tancsa <mike@sentex.net>, FreeBSD Filesystems <freebsd-fs@freebsd.org>
Subject:   Re: Unable to replace drive in raidz1
Message-ID:  <CAOtMX2hRJvt9uhctKvXO4R2tUNq9zeCEx6NZmc7Vk7fH=HO8eA@mail.gmail.com>
In-Reply-To: <0CF1E2D7-6C82-4A8B-82C3-A5BF1ED939CF@distal.com>
References:  <5ED5CB56-2E2A-4D83-8CDA-6D6A0719ED19@distal.com> <AC67D073-D476-41F5-AC53-F671430BB493@distal.com> <CAOtMX2h52d0vtceuwcDk2dzkH-fZW32inhk-dfjLMJxetVXKYg@mail.gmail.com> <CB79EC2B-E793-4561-95E7-D1CEEEFC1D72@distal.com> <CAOtMX2i_zFYuOnEK_aVkpO_M8uJCvGYW%2BSzLn3OED4n5fKFoEA@mail.gmail.com> <6A20ABDA-9BEA-4526-94C1-5768AA564C13@distal.com> <CAOtMX2jfcd43sBpHraWA=5e_Ka=hMD654m-5=boguPPbYXE4yw@mail.gmail.com> <0CF1E2D7-6C82-4A8B-82C3-A5BF1ED939CF@distal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 6, 2024 at 12:06=E2=80=AFPM Chris Ross <cross+freebsd@distal.co=
m> wrote:
>
>
>
> > On Sep 6, 2024, at 13:59, Alan Somers <asomers@freebsd.org> wrote:
> >
> > On Fri, Sep 6, 2024 at 11:50=E2=80=AFAM Chris Ross <cross+freebsd@dista=
l.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=E2=80=99s working there, liste=
d
> as diskid/???
>
> How can I map the diskid=E2=80=99s listed to the underlying device?
> either by serial number or da#=E2=80=A6

The gpart command should do it, but I don't recommend that.  Instead,
see below...

>
> > * 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=E2=80=99t significant risks there?
>
> Can I tell ZFS to reconsider the labels in the first zraid1?
> since it=E2=80=99s still reporting da3 as missing/failed, and that kernel
> dev is not what it thinks that is=E2=80=A6

Ahh, this means that there are two different vdevs that can be
described by "da3".  You can still refer to them unambiguously by guid
though.  Do "zpool status -g" to find the guid of the disk that you
want to replace, and then do "zpool replace <GUID> /dev/da10"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hRJvt9uhctKvXO4R2tUNq9zeCEx6NZmc7Vk7fH=HO8eA>