Failed to write backup file: Failed to deactivate zvol after 5m0s

Ubuntu 22.04.2 LTS
LXD version: 5.0.2

I’m using ZFS file system.
Running 10 VM in parallel on 24core + 48RAM machine.

When I try to restore from a snapshot sometimes getting following error:

Failed to write backup file: Failed to deactivate zvol after 5m0s

What happens if you stop the vm before you restore the snapshot?

With stop seems to resolve the issue

But the safest thing I found out in general, for all operations, init, launch, start, stop, delete, restore, is to use them with mutex and call each separately.

LXD is waiting for the zvol device to be deactivated, so looks like the zfs underlying subsystem is busy flushing data to disk. Does this only happen when you are doing multiple concurrent operations?

1 Like

Yes. but after some testing I think the problem occurs when the system is out of memory or CPU is over used

1 Like