Open manfromafar opened 19 hours ago
Please may you update your reproducer steps with the exact lxc snapshot
command you are using.
Also please can you confirm this issue isn't fix in latest/edge
channel? Thanks
OK, just tried it with edge
lxd git-ba31c87 31205 latest/edge canonical✓ -
and same behavior occurs.
Snap 3 is deleted then resent
Updated the reproduction steps to have the snapshot commands. It's using the plan lxc snapshot commands.
Required information
Issue description
When sending a copy of a container to another host using lxc copy --refresh using a zfs backend on both systems top level snapshot is deleted on the remote and resent even if the snapshots are identical.
This can cause large amounts of unnecessary network traffic, disk io, etc.
Some steps to help resolve this. Would be before sending any snapshots checking the zfs guid property for the snapshots on both hosts and comparing. Since the zfs guids for the snapshots can't change as they are read only. If both parties leading snapshot match then no operations are needed. This might have to be a new flag to specify you only want to check snapshot consistency instead of the live data as well. Something like
--snaps-only
or a better name.Steps to reproduce
lxc snapshot c1 1
b.lxc snapshot c1 2
lxc exec c1 -- dd if=/dev/urandom of=/root/dd.img bs=1M count=1000
lxc snapshot c1 3
lxc info c1
should show snapshots 1,2,3 b.zfs list -t snapshot
should show the snapshots for c1 (assumes your pool isn't managed by lxdInformation to attach
dmesg
)lxc info NAME --show-log
)lxc config show NAME --expanded
)lxc monitor
while reproducing the issue)