ZFS Storage: Reconfiguring pool, now "source" key in "lxc storage list" is incorrect


(Matt Wiebold) #1

I initially created a container with a file-based ZFS pool (/var/lib/lxd/disks/lxd.img) and then decided I wanted dedicated disks for this container. Not really thinking it through, I just added a disk to the ZFS pool, then removed the lxd.img file (actually replaced it with another disk for a mirror).

So now I have a container running on the lxd pool (see zpool status output below) that isn’t where the source was before (lxd.img). When I do “lxc storage list” I get /var/lib/lxd/disks/lxd.img as the source for the lxd device.

Does this source key need to be correct? I am getting an error when trying to launch a new container claiming no root disk device could be found… noticed that the source key no longer reflects reality and wanted to verify that wasn’t causing the issue.

zpool status output:


(Stéphane Graber) #2

The source key not matching the current backing device of the pool shouldn’t be a problem. You have another key which records the ZFS pool name and that’s what LXD actually uses to interact with ZFS.

The error you’re getting is usually an indication that your default profile or the profile you’re using for your container is lacking a disk device for /.


(Matt Wiebold) #3

Makes sense, thanks for the info. I was able to launch the container by specifying the storage using -s.