From owner-freebsd-fs@freebsd.org Thu Mar 26 11:41:39 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 5611B27C850 for ; Thu, 26 Mar 2020 11:41:39 +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 48p33d20c2z3PNc for ; Thu, 26 Mar 2020 11:41:33 +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 1jHQt1-000PZK-6v; Thu, 26 Mar 2020 11:41:23 +0000 Date: Thu, 26 Mar 2020 11:41:23 +0000 From: Gary Palmer To: Attila Nagy Cc: freebsd-fs@freebsd.org Subject: Re: Importing a vdev copied zpool from file Message-ID: <20200326114123.GA98069@in-addr.com> References: <20200325233241.GA43047@in-addr.com> 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: 48p33d20c2z3PNc X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.68 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.85)[-0.847,0]; NEURAL_HAM_LONG(-0.83)[-0.834,0]; TAGGED_RCPT(0.00)[]; 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: Thu, 26 Mar 2020 11:41:39 -0000 On Thu, Mar 26, 2020 at 10:21:23AM +0100, Attila Nagy wrote: > On Thu, 26 Mar 2020 at 00:32, Gary Palmer wrote: > > > > > Use mdconfig(8) or similar to turn the file into a device and then it > > should work > > > > Sure, that (also, iscsi, ggate etc, but mdconfig is the easiest amongst > them if the file is locally available) works, thanks. > I'm just wondering why it doesn't with the zpool interface, which is much > more convenient to use. > Maybe because the whole disk schema (ZFS arranges data differently on a > block device than in a file)? Disks and files have different interfaces in the kernel. The fact that mdconfig(8) exists shows that it is possible to fake the kernel into thinking that a flat file is a device. Thus it should be possible to teach that to ZFS also, or any other filesystem such as UFS. However I'm not sure the extra complexity in the kernel to do that for each filesystem when a generic, filesytem independant, interface already exists in mdconfig(8). Regards, Gary