I do the lxd init for the second time, and the Error information appears. $ lxd init
Error: Failed to create storage pool 'default': Failed to run: zpool create -f -m none -O compression=on default /var/snap/lxd/common/lxd/disks/default.img: cannot create 'default': pool already exists
Even though I sudo snap remove --purge lxd, and then sudo snap install lxd. When I do lxd init, such Error information appears too.
How can I deal with it?
I don’t have “zpool” and “zfs” programs installed. So I do sudo apt install zfs-fuse on my Ubuntu 16.04 real machine.
Then $ sudo zpool list connect: no such file or directory Please make sure that the zfs-fuse daemon is running. internal error: failed to initialize ZFS library
$ sudo zfs list connect: no such file or directory Please make sure that the zfs-fuse daemon is running. internal error: failed to initialize ZFS library
Big brother, you are right!
I use sudo zpool destroy default. And I can successfully lxd init, presssing “Enter” key all the time with all default configurations.
But may the development team of LXD come up with a tool command inside the lxd? In that way I can operate easily and more relevantly to the lxd.
On a fresh system lxd init should complete fine, but we we don’t want to use an existing zpool if one already exists, which is why it warns you. You can choose to use a different zpool in the case where you were genuinely using default zpool for for some other purpose.