mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2026-10-19 17:33:25 +00:00
The zfs snapshot was read through <subject>/.zfs/snapshot/<name>. The kernel automounts that directory through a usermode helper that runs in the host's mount namespace, so a containerised baudolo never sees the mount and finds no snapshot. The snapshot is now mounted explicitly at <subject>/.baudolo-<tag>, beside where btrfs carves its own, and removed in order: umount, rmdir, zfs destroy. A failed mount destroys the snapshot at once instead of leaking one per run. The e2e suite could not reach this code at all: zpool create on the /img file failed with "no such pool or dataset", because the kernel opens vdevs from a taskq thread that resolves paths in the host's root, where the container's /img does not exist. The pool now sits on a loop device, whose /dev/loopN node the kernel creates on the host as well, and it is destroyed on exit once this script created it, since a pool is kernel-wide. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>