Disk device with shift and recursive

Is there a way to get both shift and recursive behaviour for disk devices in LXD 4.19? When I add a ZFS based disk device with both shift and recursive set to true, only the base directory is mounted in the container with the shift overlay. My devices looks like:

devices:
  data:
    path: /data
    recursive: "true"
    shift: "true"
    source: /host/test
    type: disk

In the container /data does not not have any of the ZFS filesystems mounted in /host/test on the host. If the host has another filesystem mounted at /host/test/child, then the directory /data/child is in the container, but is empty because the filesystem is not mounted. If I remove the shift then the child filesystem(s) are mounted, but of course none have the shift overlay.

Ubuntu 20.04 with snap LXD 4.19

shiftfs sadly does not handle recursion properly. I believe that’s something with idmapped mounts will solve but for this to be the case, it currently needs to be ext4, btrfs or xfs as other filesystems haven’t gotten support yet. Additionally you also need a very very recent kernel.

So in short, if dealing with zfs or a pre 5.13 kernel, you’re still stuck with shiftfs and for that, it’s easier to ignore the recursion option and add multiple devices covering the various mount points.