Date: Thu, 26 Mar 2020 11:41:23 +0000 From: Gary Palmer <gpalmer@freebsd.org> To: Attila Nagy <nagy.attila@gmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: Importing a vdev copied zpool from file Message-ID: <20200326114123.GA98069@in-addr.com> In-Reply-To: <CAM2hQG_AQgTU%2BJOCWLfzNCe2DdbiMuMyYaT3B5buVCEjzBYyww@mail.gmail.com> References: <CAM2hQG_iREkW=tsX=rF8XCOe1CFxumbftr7am6uZ0X6u-YFKQw@mail.gmail.com> <20200325233241.GA43047@in-addr.com> <CAM2hQG_AQgTU%2BJOCWLfzNCe2DdbiMuMyYaT3B5buVCEjzBYyww@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 26, 2020 at 10:21:23AM +0100, Attila Nagy wrote: > On Thu, 26 Mar 2020 at 00:32, Gary Palmer <gpalmer@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200326114123.GA98069>