From owner-freebsd-questions@freebsd.org Tue Apr 14 19:05:03 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80CF82C7228 for ; Tue, 14 Apr 2020 19:05:03 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [IPv6:2001:470:0:19b::b869:801b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "xray.he.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 491w0Z3RK6z4bNS for ; Tue, 14 Apr 2020 19:05:02 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Tue, 14 Apr 2020 12:04:47 -0700 Subject: Re: replace disk in zpool - solved To: freebsd-questions@freebsd.org References: <18a94704-5411-3b44-a525-2ae50121a467@holgerdanske.com> <4a8d409e-ecac-77c8-3ad9-025aefdfb4ef@holgerdanske.com> <20200325081814.GK35528@mithril.foucry.net> <25828f1e-8a9c-6e05-aa62-eefc734ae412@chroot.pl> <07f3de58-b1ac-d1c1-e794-c455f13cc79c@holgerdanske.com> From: David Christensen Message-ID: Date: Tue, 14 Apr 2020 12:04:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 491w0Z3RK6z4bNS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dpchrist@holgerdanske.com has no SPF policy when checking 2001:470:0:19b::b869:801b) smtp.mailfrom=dpchrist@holgerdanske.com X-Spamd-Result: default: False [-2.79 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.985,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; IP_SCORE(-1.72)[ip: (-0.29), ipnet: 2001:470::/32(-4.66), asn: 6939(-3.60), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.99)[-0.989,0]; DMARC_NA(0.00)[holgerdanske.com]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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, 14 Apr 2020 19:05:03 -0000 On 2020-04-14 08:09, Lukasz wrote: > On 4/1/20 23:43, David Christensen wrote: >> On 2020-04-01 11:13, Lukasz wrote: >>> On 3/30/20 21:02, David Christensen wrote: >>>> On 2020-03-30 11:06, Lukasz wrote: >>>>> this behavior was due to errors in zpool. >>>> Solved how? Could you please expand upon errors in zpool and >>>> how you got past them? >>> I restored corrupted files from backup. >> That is something I would like to learn how to do on ZFS. Could >> you please elaborate: >> >> - How did you determine what files were corrupt? >> >> - How do you perform backups? >> >> - How did you restore the corrupted files? > information about corrupted files is at the end of 'zpool status' > output. I perform backup by zfs snapshot and zfs send/recv > (incremental> snapshots) to an other server. Saying restore form > backup I mean copy correct files from previous snapshot. Okay. I also backup ZFS filesystems via snapshots and incremental replication. Looking at your previous post: On 2020-03-24 14:15, Lukasz wrote: > # zpool status -v mypool > errors: Permanent errors have been detected in the following files: > mypool/XXXXXXXXXXXX And this Oracle document: https://docs.oracle.com/cd/E18752_01/html/819-5461/gbbwl.html#gbctx So, the corruption in your ZFS pool was a file in a dataset that was not mounted (?). Recovery consisted of mounting the dataset and using cp(1) to copy a non-corrupt version of the file to the path of the corrupt file (?). David