Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2018 17:26:49 -0600
From:      Thomas Johnson <tommyj27@gmail.com>
To:        wingairak@gmail.com
Cc:        freebsd-fs@freebsd.org
Subject:   Re: mount zpool from a zfs volume
Message-ID:  <CAMwYC7bCNH7W5JcuTZgEUaip59VXLm4u1VD=3Rj3twpiH%2B_pew@mail.gmail.com>
In-Reply-To: <CA%2B3BqY251VyCLc40dWOXXyTrNRMtZYgb_hB1xv0UigE1Gv67pg@mail.gmail.com>
References:  <CA%2B3BqY251VyCLc40dWOXXyTrNRMtZYgb_hB1xv0UigE1Gv67pg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>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@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMwYC7bCNH7W5JcuTZgEUaip59VXLm4u1VD=3Rj3twpiH%2B_pew>