How to grow a loop backed ZFS pool

In case a physical host is finishing the available space for LXC managed by LXD, this latter doesn’t let you directly grow a loop backed ZFS pool, here is a quick workaround:

$sudo truncate -s +5G /var/lib/lxd/disks/<POOL>.img
$sudo zpool set autoexpand=on lxd
$sudo zpool online -e lxd /var/lib/lxd/disks/<POOL>.img
$sudo zpool set autoexpand=off lxd