Nfs, zabbly-kernel, zabbly-zfs = Stale file handle

Hi, I found an interesting case with current incus, zabbly-kernel and zabbly-zfs.

I have a privileged container running nfs3 kernel server. /images is on zfs. /images2 on btrfs.

devices:
  images:
    path: /images
    source: /zfs/xxx/images
    type: disk
  images2:
    path: /images2
    source: /btrfs
    type: disk

When I try to mount /images on another computer, I get “Stale file handle”, but mounting /images2 works correctly. What secret can be in ZFS to work incorrectly? I tried zfs set sharenfs=onon the host but it has not changed anything.

I’d need interested to know if that issue is unique to the container case or if it’s a more generic issue between NFS and ZFS in this particular configuration.

The container is bookworm from images.

But I have even more interesting information, I have just checked logs and NFS on ZFS dataset was working correctly on standard ubuntu noble kernel and stopped working when machine got lifted to zabbly kernel+zfs pair.

Yeah, I don’t think the container or Incus is the problem here as privileged containers don’t do much containing and the NFS server is implemented in the kernel.

My guess is that it’s a bad interaction between the latest ZFS and latest kernel when it comes to being a NFS server.

It would be good to replicate the issue without a container being involved, then report it to ZFS on GitHub.

1 Like