Page tree
Skip to end of metadata
Go to start of metadata

Zpool is a portion of the hard disk that is used by your containers, this size is defined when running lxd init, the default size is 15GB.

To check the remaining space use the zpool list command.

sudo zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
lxd   19.9G  14.4G  5.44G         -    49%    72%  1.00x  ONLINE  -

If zpool is full you will not be able to create any containers.

To resize the zpool use these commands.

# make sure zfs autoexpand is enabled (only needed once)
sudo zpool set autoexpand=on lxd

# This is where you define the size
sudo truncate -s 20G /var/lib/lxd/zfs.img

# Make zfs realize the fact that partition has been changed and make zpool
# use the new partition which is actually the same one
sudo zpool online -e lxd /var/lib/lxd/zfs.img /var/lib/lxd/zfs.img
  • No labels