Correct me if i am wrong, but as i understand lxc move --stateless will provide the following on eg. zfs storage backend.
- copy instance config.
- copy storage with eg. zfs send / receive
- stop source container.
- incremental send / receive
- start instance on target
This seems like what i have been looking for and of course i am testing it out before using it in production.
On a base debian/buster with almost nothing installed i lose 1 ping using lxc move --stateless.
However on our production environment we will have disk write and read while moving, so i tried to download a big file on the container while moving, and this is where i get in trouble. The instance is copied and started on the target - however the lxc command fails on deletion of the source container:
Error: Failed to delete original instance after copying it: Failed to run: zfs destroy -r tank0/lxd/containers/stateless: cannot destroy snapshot tank0/lxd/containers/stateless@migration-13e92f0e-de09-4341-930e-bcaab652c00e: dataset is busy
And running ps aux | grep zfs on the source host shows that zfs send is still running.
Is this a bug or is it as expected?
Both hosts are running Debian Buster 10.3 with kernel 5.4 from backports - zfs 0.8.3 and snap lxd version 3.21