From owner-freebsd-fs@freebsd.org Wed Mar 25 23:33:02 2020 Return-Path: Delivered-To: freebsd-fs@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 8443A2670DB for ; Wed, 25 Mar 2020 23:33:02 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48nkts4GZYz4GS4 for ; Wed, 25 Mar 2020 23:32:52 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jHFVp-000MLC-KR; Wed, 25 Mar 2020 23:32:41 +0000 Date: Wed, 25 Mar 2020 23:32:41 +0000 From: Gary Palmer To: Attila Nagy Cc: freebsd-fs@freebsd.org Subject: Re: Importing a vdev copied zpool from file Message-ID: <20200325233241.GA43047@in-addr.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48nkts4GZYz4GS4 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.74 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.848,0]; NEURAL_HAM_LONG(-0.89)[-0.895,0]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 23:33:02 -0000 On Thu, Mar 26, 2020 at 12:29:10AM +0100, Attila Nagy wrote: > Hi, > > I'm wondering, why this doesn't work and what could be done to make it work? > > # zpool status disk0 > pool: disk0 > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > disk0 ONLINE 0 0 0 > da0 ONLINE 0 0 0 > > errors: No known data errors > # zpool export disk0 > # dd if=/dev/da0 of=/data/da0 > # zpool import -d /data disk0 > pool: disk0 > id: 13816971982532029716 > state: UNAVAIL > status: One or more devices contains corrupted data. > action: The pool cannot be imported due to damaged devices or data. > see: http://illumos.org/msg/ZFS-8000-5E > config: > > disk0 UNAVAIL insufficient replicas > 10876703685892021104 UNAVAIL corrupted data Use mdconfig(8) or similar to turn the file into a device and then it should work Regards, Gary