Lxc copy use --instance-only flag

I have a container named c1, which occupies approximately 50GB of disk space. When I use the command “lxc copy c1 c2 --instance-only” and check with the “lxc list -c ns4tD” command, the disk space used by the c2 container is only 1.09MiB. However, when I check the disk space used by c2 container using the “lxc exec c2 – df -h /” command, it shows that it is using approximately 50GB. What could be causing this issue?

My testing environment is as follows:
The operating system version is Ubuntu 22.04 LTS, and the LXD version is 5.12. The LXC version is also 5.12.

That would be because your container has only diverged by 1MiB compared to its origin (c1).

You can change this behavior by using the zfs.use_refquota config key either globally on your storage pool or just on the one instance.

1 Like

Hi, @stgraber

Thank you for all your assistance I really appreciate your help in resolving the problem.