> The fact that LXD doesn't put /var/lib/lxd itself in the ZFS pool is
> intentional.

I wasn't suggesting that in the general case. Creating a dataset at
/var/lib/lxd has more to do with the root-on-ZFS setup, and is
independent of where to place the lxd storage pool(s). I can see how
that's distracting. Let's ignore that.

The mountpoint problem exists just the same in this scenario:
truncate -s 10G /var/lib/pool.img
zpool create pool /var/lib/pool.img
apt install lxd
lxd init
# Specify "no" to creating a pool, and "pool" as the existing dataset.
# Accept the rest of the defaults.
lxd launch ubuntu:

You'll end up with /pool/containers and /pool/images mounted.

> If you opt into using a subset of an existing pool, we assume you know
> what you're doing and that you will properly configure it prior to
> giving it to LXD (LXD won't create it for you so you kinda have to).

It's true that the admin has to create the pool first. But they do not
have to create the datasets for lxd to work. lxd will implicitly create
the containers and images datasets through the use of `zfs create -p
POOL/containers/foo".

I'm suggesting this change (untested):
https://github.com/rlaager/lxd/commit/7c9f79c9451fad646c533fc6bb5ea3e67535eab8

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1629824

Title:
  lxd should explicitly create "containers" and "images" datasets on ZFS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1629824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to