Re: Unable to replace drive in raidz1

From: Wes Morgan <morganw_at_gmail.com>
Date: Fri, 06 Sep 2024 18:44:04 UTC

On September 6, 2024 1:35:22 PM CDT, Chris Ross <cross+freebsd@distal.com> wrote:
>
>
>> On Sep 6, 2024, at 14:21, Chris Ross <cross+freebsd@distal.com> wrote:
>> NAME                      STATE     READ WRITE CKSUM
>> tank                      DEGRADED     0     0     0
>> 16506780107187041124    DEGRADED     0     0     0
>>   9127016430593660128   FAULTED      0     0     0  external device fault
>>   4094297345166589692   ONLINE       0     0     0
>>   17850258180603290288  ONLINE       0     0     0
>> […]
>> % sudo zpool replace tank 9127016430593660128 /dev/da10
>> cannot replace 9127016430593660128 with /dev/da10: already in replacing/spare config; wait for completion or use 'zpool detach’
>> % 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’
>
>
>Another related question.  I can (and just did) “glabel create” so the “new” disk
>that is called da10, but is still in chassis drive slot 3 where da3 _used_ to be.
>Now the new disk can be descirbed as “label/drive03”.  This is what I do with
>ext4 labels on Linux machines on similar hardware.
>
>Can I add labels to the ZFS devices without hurting them?  glabel says it
>overwrites the last sector with label information it manages.  Is there space
>on a disk that is used entirely for a ZFS device?

No, do not do this. Do not do anything at all to a device if the entire device will be assigned to a pool.