[lxc-users] ZFS configuration
Mike Wright
nobody at nospam.hostisimo.com
Tue Aug 21 19:42:14 UTC 2018
On 08/21/2018 11:40 AM, Stephen Brown Jr wrote:
> Hello,
> I am just getting started with LXD. I have an existing zfs pool,
> and want to use a ZFS dataset on that pool to store my containers on.
>
> I ran the command lxc storage create pool1 zfs source=fast/containers,
> and it appeared to create it, however, I do not see it in the /fast
> directory nor does zpool status list this.
>
> It's possible that I don't understand how this works however. I do see
> it created if I run the command lxc storage list, it does indeed show up:
>
> | pool1 | | zfs | fast/containers | 0
>
> I created a container for testing thinking it would show up, but no go
> on that either.
>
> Would like to understand how this is implemented and what I should expect?
Hi,
I'm also new to zfs and lxd so my help is limited.
Did you mount your zfs dataset anywhere? My ubuntu system is like
/var
/lib
/lxd
/containers
...
/storage-pools
/lxd <-- my lxc pool name; zfs dataset name; mountpoint
/containers
...
/snapshots
For this to work you *must* mount your dataset before you create any
containers. If you already have containers you won't be able to mount
over the top of them. zfs wants an empty mountpoint AFAIK
I mounted one level above /containers so I could get all the images,
snapshots, deleted, and containers, etc in one place and allow for
moving them as a "set".
Note that /lxd was put there by the lxc storage command. Your pool1 is
probably there, too.
More information about the lxc-users
mailing list