ZFS re attaching failed device to pool

Philipp Vlassakakis freebsd-en at lists.vlassakakis.de
Tue Nov 6 14:05:06 UTC 2018


Hi Alex,

Did you try „zpool online zroot NAME-OF-DEGRADED-DISK“ and „zpool zroot clear“ ?

Regards,
Philipp

> On 6. Nov 2018, at 14:53, Alejandro Imass <aimass at yabarana.com> wrote:
> 
>> On Tue, Nov 6, 2018 at 8:50 AM Alejandro Imass <aimass at yabarana.com> wrote:
>> 
>> Dear Beasties,
>> 
>> I have a simple 2 disk pool and one disk started failing and zfs put it in
>> a UNAVAIL status. I shut down the server and took it apart, cleaned it and
>> removed a third device that was on Sata Port C which I think may have been
>> the culprit of the bus fault. This third disk was unrelated to the pool and
>> was an older disk which just had some backup data and was running on an old
>> enclosure with the SATA wires hanging out, etc. you know, those 5 minute
>> hacks that you forget about..
>> 
>> After rebooting, the BIOS saw the failed device and the system booted
>> fine. I ran a smartctl long test on the failed device which took like 7
>> hours and the report shows no errors and the device is like new.
>> 
>> So now I want to tell ZFS to re-attach the device but the documentation is
>> not too clear about this. All the docs, and example I find is physically
>> replacing with another device, not the same one.
>> 
>> My question is almost identical to this one which has not been answered
>> either:
>> 
>> 
>> https://forums.freebsd.org/threads/re-attaching-failed-device-to-pool.66027/
>> 
>> So: can I re-attach by running the replace command on the SAME device? I
>> haven't tried it, but from the question above it seems that it won't let
>> me. Besides I don't want to screw up so if anyone has done this before pls.
>> advise how to proceed in these cases.
>> 
>> TIA!
>> --
>> Alex
>> 
>> 
>> 
> I forgot to mention I ran zpool clear zroot and it ran the scrub but did
> not put the disk back ONLINE. Here is the result:
> 
> root at poseidon:~ # zpool status -v
>  pool: zroot
> state: DEGRADED
> status: One or more devices could not be used because the label is missing
> or
>        invalid.  Sufficient replicas exist for the pool to continue
>        functioning in a degraded state.
> action: Replace the device using 'zpool replace'.
>   see: http://illumos.org/msg/ZFS-8000-4J
>  scan: scrub repaired 0 in 0h8m with 0 errors on Tue Nov  6 05:27:20 2018
> config:
> 
>        NAME                               STATE     READ WRITE CKSUM
>        zroot                              DEGRADED     0     0     0
>          mirror-0                         DEGRADED     0     0     0
>            5540674508897617692            UNAVAIL      0     0     0  was
> /dev/diskid/DISK-WD-WCC4N6XZY8C2
>            diskid/DISK-WD-WCC4N2YTRX40p3  ONLINE       0     0     0
> 
> errors: No known data errors
> 
> Again, TIA for any pointers on how to re-attach the failed disk.
> 
> -- 
> Alex
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list