nfs4j
                                
                                 nfs4j copied to clipboard
                                
                                    nfs4j copied to clipboard
                            
                            
                            
                        NFS Gateway capability?
Is this code suitable for implementing an NFS gateway to an arbitrary backend? If so, where would one start looking in the code?
Hi,
There is is VirtualFileSystem interface which have to be implemented. You should provide a persistent mapping between files ids and paths. Have a look at hadoop backend https://github.com/kofemann/hadoop-nfs/blob/master/src/main/java/org/dcache/nfs/hadoop/HadoopVfs.java
This is enough to have own implementation.
Tigran.
@kofemann The hadoop backend referenced has an implementation where an Inode is an interface, which is no longer this case here in nfs4j.  I'm confused as to how to implement a VirtualFileSystem, specifically as everything seems to require or return an Inode which wraps a FileHandle, which appears to be a low-level NFS wire format?
I don't mean to derail this issue, but I thought it related.
well, the API is evolving. Here it a regular file system base implementation:
https://github.com/kofemann/simple-nfs/blob/master/src/main/java/org/dcache/simplenfs/LocalFileSystem.java
The Inode represents a file system object. and you need a way how you identified on wire. Did you tried to implement a file system? Check https://github.com/kofemann/simple-nfs/ as an example.
Does it have hooks for clustering such as NFS-Ganesha provides in the form of CMAL (Cluster management access layer). ?
There are two parts of it. The file system related clustering is up-to backend implementation. Nevertheless nfsv4 state handling is currently hard. This part is planned to make cluster-aware, as dCache itself is distributed system, but we still evaluating different possibilities how to implement it.