Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Sep 2024 13:39:24 -0500
From:      Wes Morgan <morganw@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: Unable to replace drive in raidz1
Message-ID:  <42346193-AD06-4D26-B0C6-4392953D21A3@gmail.com>
In-Reply-To: <29003A7C-745D-4A06-8558-AE64310813EA@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> <CAOtMX2hRJvt9uhctKvXO4R2tUNq9zeCEx6NZmc7Vk7fH=HO8eA@mail.gmail.com> <29003A7C-745D-4A06-8558-AE64310813EA@distal.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On September 6, 2024 1:21:06 PM CDT, Chris Ross <cross+freebsd@distal=2Eco=
m> wrote:
>
>> On Sep 6, 2024, at 14:08, mike tancsa <mike@sentex=2Enet> wrote:
>>=20
>> On 9/6/2024 2:06 PM, Chris Ross wrote:
>>> How can I map the diskid=E2=80=99s listed to the underlying device?eit=
her by serial number or da#=E2=80=A6
>>>=20
>> What does=20
>> glabel status
>
>That shows labels for many drives, though not da1 and da2, the
>remaining members of zraid1-0=2E  Intersting=2E  But, I hope the below
>Is the fix=2E=2E=2E
>
>> On Sep 6, 2024, at 14:10, Alan Somers <asomers@freebsd=2Eorg> wrote:
>>=20
>> Ahh, this means that there are two different vdevs that can be
>> described by "da3"=2E  You can still refer to them unambiguously by gui=
d
>> though=2E  Do "zpool status -g" to find the guid of the disk that you
>> want to replace, and then do "zpool replace <GUID> /dev/da10=E2=80=9D
>
>
>Ahh, okay=2E  That makes sense=2E  I have ever only known how to replace =
things
>using the key that "zpool status=E2=80=9D shows=2E  Thanks for that!
>
>Oh=2E  Trying, that doesn=E2=80=99t work either=2E  :-/
>
>NAME                      STATE     READ WRITE CKSUM
>tank                      DEGRADED     0     0     0
> 16506780107187041124    DEGRADED     0     0     0
>   9127016430593660128   FAULTED      0     0     0  external device faul=
t
>   4094297345166589692   ONLINE       0     0     0
>   17850258180603290288  ONLINE       0     0     0
>[=E2=80=A6]
>% sudo zpool replace tank 9127016430593660128 /dev/da10
>cannot replace 9127016430593660128 with /dev/da10: already in replacing/s=
pare config; wait for completion or use 'zpool detach=E2=80=99
>% sudo zpool replace tank 9127016430593660128 diskid/DISK-ZGG0A2PA
>cannot replace 9127016430593660128 with diskid/DISK-ZGG0A2PA: already in =
replacing/spare config; wait for completion or use 'zpool detach'
>
>Tried with /dev/da10, and the diskid for da10 reported by glabel status=
=2E
>
>         - Chris
>

You should make the changes to your /boot/loader=2Econf as suggested earli=
er by Freddie Cash and reboot=2E This will eliminate all the confusion with=
 diskid=2E Then run "zpool clear", which, if da3 is still online and not co=
mpletely dead, the pool should come out of the faulted state=2E Check zpool=
 status to look for this alleged replacement in progress=2E If it is truly =
trying to replace a device, it should show up in zpool status with the actu=
al device, or the guid if it can't find the device=2E

If you have initiated a replace, and the replacing disk has now been "lost=
" or unlabeled, you are in a bind=2E I ran into this problem many years ago=
, and I thought it was fixed, but the bug was called something like "can't =
replace a replacing vdev"=2E I ultimately solved my problem by manually edi=
ting a fake vdev to have the same guid as the missing device, restarting th=
e replace and then canceling it before zfs realized it was fake=2E But, I a=
m almost certain that zpool cancel can do this now, with the guid=2E

If da10 has a label that says it is in the pool, it is probably the "repla=
cing" vdev and should be picked up=2E=2E=2E




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42346193-AD06-4D26-B0C6-4392953D21A3>