mount zpool from a zfs volume
Thomas Johnson
tommyj27 at gmail.com
Mon Nov 12 23:27:03 UTC 2018
>From UPDATING...
20160129:
Building ZFS pools on top of zvols is prohibited by default. That
feature has never worked safely; it's always been prone to deadlocks.
Using a zvol as the backing store for a VM guest's virtual disk will
still work, even if the guest is using ZFS. Legacy behavior can be
restored by setting vfs.zfs.vol.recursive=1.
That said, I was using it with good results in 11.1. Not so much in
11.2; I get an immediate deadlock. My workaround on 11.2 has been to
configure the zvol as an iscsi target and import it that way. If there
is a better way, I would love to hear it too.
On Mon, Nov 12, 2018 at 4:44 PM Robert Wing <wingairak at gmail.com> wrote:
>
> I want to import a zpool from a freebsd-zfs partition that is backed by a
> zfs volume. Is this possible? The sequence of commands that result in
> success are eluding me.
>
> gpart show:
> => 40 33554352 zvol/zroot/vol GPT (16G)
> 40 1024 1 freebsd-boot (512K)
> 1064 984 - free - (492K)
> 2048 2097152 2 freebsd-swap (1.0G)
> 2099200 31453184 3 freebsd-zfs (15G)
> 33552384 2008 - free - (1.0M)
>
> zfs list (relevant parts):
> ... zroot datasets ...
> zroot/vol 16.5G 367G 672M -
>
> I've tried 'zpool import' which produces no results, also tried explicitly
> with the -d option. The results of this command lead me to believe that the
> pool from the zfs volume is not being exported.
>
> I tried using 'zfs mount zroot/vol', failed with: operation not applicable
> to datasets of this type.
>
> The zfs volume is the backer for a VM, this is what I'm trying to acheive:
> 1) shutdown the VM
> 2) import zpool from the VM
> 3) make changes to the VM zfs datasets
> 4) export the zpool
> 5) re-boot the VM.
>
> Anyone point me in the direction of enlightenment?
>
> -Rob
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
More information about the freebsd-fs
mailing list