Fix Error: Failed to create storage pool 'default': Failed to create the ZFS pool: cannot create 'default': pool already exists
November 20, 2019
When reinstalling LXD today after having some problems, I ran lxd init and accepted all of the defaults, and then lxd init exited with this message:
Error: Failed to create storage pool 'default': Failed to create the ZFS pool: cannot create 'default': pool already exists
Okay, so the previous storage pool was already there.
I'll confirm this by running:
zpool list
... which returned this output...
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT default 28.8G 342M 28.4G - 1% 1% 1.00x ONLINE -
I see that the pool named "default" is indeed there.
So to get rid of it, all that is required is to run....
zpool destroy default
Whether it was removed or not can be confirmed by again running:
zpool list