Re: cannot use btrfs for nfs server
From: Chris Murphy <hidden>
Date: 2021-07-10 22:17:54
On Sat, Jul 10, 2021 at 12:56 AM Ulli Horlacher [off-list ref] wrote:
root@tsmsrvj:# snaprotate -v test 5 /data/fex/spool $ btrfs subvolume snapshot -r /data/fex/spool /data/fex/spool/.snapshot/2021-07-10_0849.test Create a readonly snapshot of '/data/fex/spool' in '/data/fex/spool/.snapshot/2021-07-10_0849.test'
I think this might be the source of the problem. Nested snapshots are not a good idea, it causes various kinds of confusion. It's not any different if you do an LVM snapshot and nest a bind mount of one file system in another. I have no idea how NFS works but it sounds to me it's getting confused when finding the same file system inodes multiple times and that's just what happens with snapshots. Whether Btrfs or some other snapshotting mechanism.
We cannot move the snapshots to a different directory. Our workflow depends on snaprotate: http://fex.belwue.de/linuxtools/snaprotate.html
OK does the problem happen if you have no nested snapshots (no nested subvolumes of any kind) in the NFS export path? If the problem doesn't happen, then either the tool you've chosen needs to be enhanced so it will create snapshots somewhere else, which Btrfs supports, or you need to find another tool that can. -- Chris Murphy