From owner-freebsd-questions@freebsd.org Tue Nov 6 13:53:38 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 4EB6B112466B for ; Tue, 6 Nov 2018 13:53:38 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66F49777F5 for ; Tue, 6 Nov 2018 13:53:37 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: by mail-vs1-xe35.google.com with SMTP id 124so7287432vsp.12 for ; Tue, 06 Nov 2018 05:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yabarana-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=s+lvvQlrBQ9SI6QHwgtJB8YVv5FJtHQ1WIYt03YL290=; b=k82dR7NoUG8lJvYD44gJEcCX8XsRYTQe9ua8STAzAfVqIE0TL+wCxzhVfInM7b5rZg oLwEY8MZvzuOzzH7j1W/Z7NRZwCAUn0kOeKsY+tCi0k2epgnak+bYC9HA6I994b3LUN8 rBmSSwXgUyK8Fl+ffpLkUkn+YPBTAI+nOZLojPy1P49g7AHL/I7Z3S+103fe/sZZ/UkT i+TqTsvJtPM3Nb0Myc9CUFm31PCpUSH3ZSXKgEb3wOcYwqeE9YrwW8bJSOn+DTDVmxK3 C7FlFRpPhJotlcCmBD4E2UlTyv+c3+ffssuA693TXJEVhPGAhHf4Nn7WXONywSUCXgjo UI6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=s+lvvQlrBQ9SI6QHwgtJB8YVv5FJtHQ1WIYt03YL290=; b=T6r+DAGLu/5mLmE2JZtDlhO+14FiiwcSVLxFOUqTHHNAC1JYdVD5GfLCYE9bc3j2Y5 jBp+HP/gQ1ND8RF0EF0jf3wv5zoV8oqVJozmedzhLkZljr7KB69csp38AmOx7bd8yvfr ZZsLThOmM581SGvOJB6+zI3AVtVHH+V4HbHpPodSYW+R47fgFTUJYsgbDvaOP7tl9oXZ Cql90iqw2gdz404V9MFsk+ldanWE1x01okCY8YklmrAGTscQl21fDV4fZZUaDGaH0Oz+ BBqdkNGyr5HDAnekbtyrzQ86Gm8bdZ3naoCuFXewI1IqDfOwFMV6jDGqE5bQ2ZerRQzy KuVQ== X-Gm-Message-State: AGRZ1gJwolQgJRitqIqQ4NfSpX9fhMY10BL27qTM+6jqqt1gatafmOKc iomxizYJ2+XOpQ0xkNFOI37n08ucnlRru7PqibPmAJxLJMw= X-Google-Smtp-Source: AJdET5er+D/uXbBxtDTuS4dtxqSRwNPoi36KHPQrMgdVAws4iao4fWowy5gQ+oBfBeH3V2s3/V2J7p1UmpUraiUxTJM= X-Received: by 2002:a67:e28a:: with SMTP id g10mr11186410vsf.178.1541512416724; Tue, 06 Nov 2018 05:53:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alejandro Imass Date: Tue, 6 Nov 2018 08:53:25 -0500 Message-ID: Subject: Re: ZFS re attaching failed device to pool To: FreeBSD Questions X-Rspamd-Queue-Id: 66F49777F5 X-Spamd-Result: default: False [-3.21 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.82)[-0.816,0]; R_DKIM_ALLOW(-0.20)[yabarana-com.20150623.gappssmtp.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[yabarana.com]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.90)[-0.900,0]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yabarana-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[5.3.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.44)[-0.444,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.54)[ipnet: 2607:f8b0::/32(-1.22), asn: 15169(-1.42), country: US(-0.08)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 13:53:38 -0000 On Tue, Nov 6, 2018 at 8:50 AM Alejandro Imass 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@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