From owner-freebsd-questions@freebsd.org Tue Nov 6 14:05:06 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D578F1124C03 for ; Tue, 6 Nov 2018 14:05:05 +0000 (UTC) (envelope-from freebsd-en@lists.vlassakakis.de) Received: from dd14614.kasserver.com (dd14614.kasserver.com [85.13.136.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D5C77FE2 for ; Tue, 6 Nov 2018 14:05:04 +0000 (UTC) (envelope-from freebsd-en@lists.vlassakakis.de) Received: from [172.29.0.93] (unknown [193.169.77.230]) by dd14614.kasserver.com (Postfix) with ESMTPSA id C642D43C1DFE; Tue, 6 Nov 2018 15:05:02 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: ZFS re attaching failed device to pool From: Philipp Vlassakakis X-Mailer: iPhone Mail (16B92) In-Reply-To: Date: Tue, 6 Nov 2018 15:05:02 +0100 Cc: FreeBSD Questions Content-Transfer-Encoding: quoted-printable Message-Id: <4C7379FD-8646-4246-9CD0-AC3B281B32C9@lists.vlassakakis.de> References: To: Alejandro Imass X-Rspamd-Queue-Id: 07D5C77FE2 X-Spamd-Result: default: False [1.30 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.29)[-0.294,0]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; NEURAL_SPAM_SHORT(0.06)[0.063,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[vlassakakis.de]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: lists.vlassakakis.de]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[14.136.13.85.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.14)[0.141,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)]; ASN(0.00)[asn:34788, ipnet:85.13.136.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 14:05:06 -0000 Hi Alex, Did you try =E2=80=9Ezpool online zroot NAME-OF-DEGRADED-DISK=E2=80=9C and =E2= =80=9Ezpool zroot clear=E2=80=9C ? Regards, Philipp > On 6. Nov 2018, at 14:53, Alejandro Imass wrote: >=20 >> On Tue, Nov 6, 2018 at 8:50 AM Alejandro Imass wrot= e: >>=20 >> Dear Beasties, >>=20 >> I have a simple 2 disk pool and one disk started failing and zfs put it i= n >> a UNAVAIL status. I shut down the server and took it apart, cleaned it an= d >> removed a third device that was on Sata Port C which I think may have bee= n >> the culprit of the bus fault. This third disk was unrelated to the pool a= nd >> was an older disk which just had some backup data and was running on an o= ld >> enclosure with the SATA wires hanging out, etc. you know, those 5 minute >> hacks that you forget about.. >>=20 >> 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. >>=20 >> So now I want to tell ZFS to re-attach the device but the documentation i= s >> not too clear about this. All the docs, and example I find is physically >> replacing with another device, not the same one. >>=20 >> My question is almost identical to this one which has not been answered >> either: >>=20 >>=20 >> https://forums.freebsd.org/threads/re-attaching-failed-device-to-pool.660= 27/ >>=20 >> 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 pl= s. >> advise how to proceed in these cases. >>=20 >> TIA! >> -- >> Alex >>=20 >>=20 >>=20 > 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: >=20 > root@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: >=20 > 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 >=20 > errors: No known data errors >=20 > Again, TIA for any pointers on how to re-attach the failed disk. >=20 > --=20 > Alex > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.or= g"