Importing a vdev copied zpool from file

Gary Palmer gpalmer at freebsd.org
Thu Mar 26 11:41:39 UTC 2020


On Thu, Mar 26, 2020 at 10:21:23AM +0100, Attila Nagy wrote:
> On Thu, 26 Mar 2020 at 00:32, Gary Palmer <gpalmer at 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


More information about the freebsd-fs mailing list