A little missundertanding for 'lxd init'

Hi
If I want to use another place for the storage “default” in lxd, when I use ‘lxd init’, I need to answer no at the question:

Create a new ZFS pool? (yes/no) [default=yes]: no

and give the name of the new desired zfs: vm/sp/default under an existing one vm/sp to:

Name of the existing ZFS pool or dataset: vm/sp/default

It works well but I find this a little bit “strange” ;o)
May be I missing something ??

have a good day ;o)

Hi,
Can you show us the lxc storage list or lxc storage show default?
Thanks.

Here is:

lxc storage show default

config:
source: root/vm/sp/default
volatile.initial_source: root/vm/sp/default
zfs.pool_name: root/vm/sp/default
description: “”
name: default
driver: zfs
used_by:

  • /1.0/images/e4b955a80ca967196389c17f0a569270bfdd951b1462acaf903d2189ef3c74d2
  • /1.0/instances/srv-apache
  • /1.0/instances/srv-haproxy
  • /1.0/instances/srv-rsyslog
  • /1.0/profiles/default
    status: Created
    locations:
  • none

zfs list root/vm/sp/default -r

NAME USED AVAIL REFER MOUNTPOINT
root/vm/sp/default 31.4M 1.76T 24K none
ns388803~#zfs list root/vm/sp/default -r
NAME USED AVAIL REFER MOUNTPOINT
root/vm/sp/default 31.4M 1.76T 24K none
root/vm/sp/default/containers 22.4M 1.76T 24K none
root/vm/sp/default/containers/srv-apache 4.48M 1.76T 11.0M /var/snap/lxd/common/lxd/storage-pools/default/containers/srv-apache
root/vm/sp/default/containers/srv-haproxy 17.7M 1.76T 24.1M /var/snap/lxd/common/lxd/storage-pools/default/containers/srv-haproxy
root/vm/sp/default/containers/srv-rsyslog 170K 1.76T 8.82M /var/snap/lxd/common/lxd/storage-pools/default/containers/srv-rsyslog
root/vm/sp/default/custom 24K 1.76T 24K none
root/vm/sp/default/deleted 120K 1.76T 24K none
root/vm/sp/default/deleted/containers 24K 1.76T 24K none
root/vm/sp/default/deleted/custom 24K 1.76T 24K none
root/vm/sp/default/deleted/images 24K 1.76T 24K none
root/vm/sp/default/deleted/virtual-machines 24K 1.76T 24K none
root/vm/sp/default/images 8.82M 1.76T 24K none
root/vm/sp/default/images/e4b955a80ca967196389c17f0a569270bfdd951b1462acaf903d2189ef3c74d2 8.80M 1.76T 8.80M /var/snap/lxd/common/lxd/storage-pools/default/images/e4b955a80ca967196389c17f0a569270bfdd951b1462acaf903d2189ef3c74d2
root/vm/sp/default/virtual-machines 24K 1.76T 24K none

It works well, I just find strange that I have to answer no at the question “Create a new ZFS pool?” to successfully create a pool ?

Otherwise the only option offered is the creation of a virtual file system
May be I missing something ?

LXD can handle to create zfs pool if you choose the pool creation. Otherwise you should create on your own as you did before with zpool utility.
Regards.

I understood where my incomprehension came from; o)

I thought creating the pool in lxd init did the same as the command:
lxc storage create pool1 zfs source = / dev / sdX
that is, create a zfs dataset.

I reread the documentation and found the source of my misunderstanding:
https://linuxcontainers.org/lxd/docs/master/storage

to create a zpool i have to use the command with the zfs.pool_name option:
lxc storage create pool1 zfs source = / dev / sdX zfs.pool_name = my-tank

So effectively lxd init asks if we want to create a zfs pool, otherwise it will create a dataset in the given space: zpool or zfs dataset.

Thank you for this exchange; o)
Regards