Re: cannot use btrfs for nfs server

Graham Cobb
2021-07-09T00:05:30Z

On 08/07/2021 23:17, Ulli Horlacher wrote:
>
> I have waited some time and some Ubuntu updates, but the bug is still there:

Yes: find and du get confused about seeing inode numbers reused in what
they think is a single filesystem. However, the filesystems are not
actually corrupted, and all normal file and directory actions work
correctly. The loops and cycles are not there - but find and du can't
tell that.

I use NFS mounts of btrfs disks all the time and have never had any real
problem - just find and du confused.

You can eliminate the problems by exporting and mounting single
subvolumes only - making sure that there are no nested subvolumes
exported, or that the subvolumes are all mounted individually.

> This makes btrfs with snapshots unusable as a nfs server :-(

No, it doesn't. I use it ALL the time: my main data lives on btrfs
servers and is exported to the clients. I use tools like btrbk and
btrfs-snapshot-aware-rsnapshot on the server and then access those btrfs
snapshots from the clients over NFS as well (for example to retrieve
accidentally deleted files). You just have to be careful with subvolume
structure and what you mount where. And I recommend only using find and
du operations on the server, not the client.

> How/where can I escalate it further?

Try complaining to NFS. It might be that it would work better if NFS
assigned different NFS filesystem IDs to each subvolume - I don't know.