nfs4j icon indicating copy to clipboard operation
nfs4j copied to clipboard

NFS Gateway capability?

Open dgrnbrg opened this issue 11 years ago • 5 comments

Is this code suitable for implementing an NFS gateway to an arbitrary backend? If so, where would one start looking in the code?

dgrnbrg avatar Feb 12 '14 02:02 dgrnbrg

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 avatar Feb 12 '14 11:02 kofemann

@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.

daf avatar Dec 17 '15 15:12 daf

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.

kofemann avatar Dec 17 '15 16:12 kofemann

Does it have hooks for clustering such as NFS-Ganesha provides in the form of CMAL (Cluster management access layer). ?

vinaypunrao avatar Jul 15 '16 02:07 vinaypunrao

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.

kofemann avatar Jul 15 '16 08:07 kofemann