Re: Having a disk double listes in a zraid3 pool

From: Willem Jan Withagen <wjw_at_digiware.nl>
Date: Mon, 17 Jul 2023 12:31:35 UTC
On 17-7-2023 14:10, Julien Cigar wrote:
> On Mon, Jul 17, 2023 at 01:59:32PM +0200, Willem Jan Withagen wrote:
>> Hi,
>>
>> I admit it is on Linux, but still hope to find the answer here...
>>
>> When Replacing a broken disk I ended up with 2 times the same disk
> How did you replace the broken disk?
>
> The correct way is to issue 1) zpool offline, 2) replace physical disk and
> 3) gpart backup good_disk|gpart restore -F new_disk 4) zpool replace
>
> Also, don't forget to boot code on the EFI partition
It was a bit more convoluted since it is a disk on an LSI 3108 in jbod mode.
So I needed to set JBOD on the disk and reboot.
But yes, I first offlined the disk.
And after reboot replaced the disk.

--WjW

>
>> and thus the zraid is in DEGRADED state:
>>    pool: zfs-data
>>   state: DEGRADED
>> status: One or more devices has experienced an unrecoverable error.  An
>>          attempt was made to correct the error.  Applications are unaffected.
>> action: Determine if the device needs to be replaced, and clear the errors
>>          using 'zpool clear' or replace the device with 'zpool replace'.
>>     see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
>>    scan: resilvered 1.09G in 00:01:10 with 0 errors on Mon Jul 17 13:36:10
>> 2023
>> config:
>>
>>          NAME        STATE     READ WRITE CKSUM
>>          zfs-data    DEGRADED     0     0     0
>>            raidz3-0  DEGRADED     0     0     0
>>              sdb     ONLINE       0     0     0
>>              sdd     ONLINE       0     0     0
>>              sde     ONLINE       0     0     0
>>              sdf     ONLINE       0     0     0
>>              sdg     ONLINE       0     0     0
>>              sdh     ONLINE       0     0     0
>>              sdi     ONLINE       0     0     0
>>              sdj     ONLINE       0     0     0
>>              sdk     ONLINE       0     0     0
>>              sdl     OFFLINE      0     0     0
>>              sdl     ONLINE       0     0     0
>>            raidz3-1  ONLINE       0     0     0
>>              sdm     ONLINE       0     0     0
>>              sdn     ONLINE       0     0     0
>>              sdo     ONLINE       0     0     0
>>              sdq     ONLINE       0     0     5
>>              sdp     ONLINE       0     0     5
>>              sdr     ONLINE       0     0     0
>>              sds     ONLINE       0     0     0
>>              sdt     ONLINE       0     0     0
>>              sdu     ONLINE       0     0     0
>>              sdv     ONLINE       0     0     0
>>              sdw     ONLINE       0     0     0
>>              sdx     ONLINE       0     0     0
>>
>> errors: No known data errors
>>
>> Any idea how to fix this?
>>
>> Regards,
>> --WjW
>>