Can FUSE filesystems be layered/nested? (I would use the verb "stacked", but that might confuse the issue with kernel module file system stacking in the same process space
).
I've scoured the web an haven't been able to find an answer to this question. I've also tested emperically for the answer, with inconclusive results.
I have numerous use cases in mind for this. E.g.:
- Mp3 tagging FS on top of ZFS-FUSE.
- Union FS on top of NTFS-3G.
- Caching FS on top of checksumming FS on top of compression FS on top of encryption FS on top of webdav FS.
And so on. (Yes I realize the last one would be a stretch in any scenario.) Or basically, ANY special-purpose FS on top of ZFS-FUSE, or NTFS-3G. (My particular interest is the former.)
I have tested this out - specifically, encfs on top of ZFS-FUSE. It didn't work. I don't recall the exact problems nor did I document the results, but the result was a very unhappy filesystem. (It did actually all mount without error if I remember correctly.) I tried many workarounds, and the end result was a non-functioning file system (I know that's vague; as is my memory).
So that got me thinking, is it even possible? Is FUSE even designed for this? And if it is, is it designed in such a way that layered filesystems are reliably abstracted from each other so that they don't care and can't know what the underlying FS is?
I do realize there would be performance penalties with these use cases, many non-exact alternatives, etc. So it would be nice to not receive use-case/alternatives lectures that (some) in the Linux community feel compelled to provide :-).