Growing a loop backed ZFS pool: possibility of data loss?

Hello,

this operation is described in the LXD docs:

sudo truncate -s +5G /var/lib/lxd/zfs.img
sudo zpool set autoexpand=on lxd
sudo zpool online -e lxd /var/lib/lxd/zfs.img
sudo zpool set autoexpand=off lxd

Is it safe to perform it for a pool with containers or is there a possibility of losing container data?

It’s safe to do so long as you have enough space for it.
This can be done online while containers are running.

1 Like

Cool, thank you. Maybe this could be added to the documentation also?

There is currently reference documentation for LXD.
That info would fit to a User Guide instead.