ZFS re attaching failed device to pool

Alejandro Imass aimass at yabarana.com
Tue Nov 6 13:51:08 UTC 2018


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


More information about the freebsd-questions mailing list