[Gluster-devel] Multiple NFS Servers (Gluster NFS in 3.x, unfsd, knfsd, etc.)

Shehjar Tikoo shehjart at gluster.com
Tue Jan 5 21:26:32 UTC 2010


----- "Gordan Bobic" <gordan at bobich.net> wrote:
> I'm not sure if this is the right place to ask, but Google has failed
> me 
> and it is rather related to the upcoming Gluster NFS export feature. 
> What I'm interested in knowing is whether it will be possible to run 
> Gluster NFS export for glfs mounts while using knfsd as per standard
> for 
> exporting non glfs paths?

With native NFS there'll be no need to first mount a glusterFS
FUSE based volume and then export it as NFS. The way it has been developed is that
any glusterfs volume in the volfile can be exported using NFS by adding
an NFS volume over it in the volfile. This is something that will become
clearer from the sample vol files when 3.0.1 comes out.

The answer to your question is, yes, it will be possible to export your
local file system with knfsd and glusterfs distributed-replicated volumes
with Gluster NFS translator BUT not in the first release.

> 
> e.g. if /home is a glfs mounted volume and /usr/src is on a raw block
> 
> device, will it be possible to have /home handled by the glfs NFS
> export 
> while having /usr/src handled by the native knfsd?
> 

Also, you'll be able to export both using the Gluster NFS server and
not need the knfsd at all but that is irrelevant for you I suppose.

> As far as I can tell main problem with this setup is that I can't see
> 
> how will RPC mountd on the server would know which NFS server should
> be 
> handling the connection, if there were more than one (could more than
> 
> one even be registered with RPC/portmap?).

Correct. More than one port for the same RPC service, i.e. NFSv3 and MNTv3
in our case, cannot be registered with portmapper on the NFS server.

On Linux, a work-around is to tell the NFS client that instead
of querying the portmapper on the NFS server for the MOUNTv3 and NFSv3
ports, use ports X and Y for directly contacting the server's MNTv3
and NFSv3 service. This is done by using "port=X" and "mountport=Y" options
to mount command. See man nfs for more info.

The NFS translator right now does not make it possible for
the knfsd and Gluster NFS to co-exist on the same box(even if the above
options are used) but it is not hard to do and I will include this option
in one of the subsequent releases.


> 
> One possible work-around I can think of is to have one daemon listen
> for 
> NFS connections on TCP and the other on UDP, but this is a bit lame.
BTW, we're only supporting NFS over TCP in the upcoming NFS translator.

-Shehjar


> The 
> only other way I can think of doing it is to put something like an 
> OpenVZ VM (jail/zone/chroot) on the server, bind mount one lot of 
> volumes that needs exporting onto that, and then export each lot from
> a 
> separate machine (one virtual one physical), from different IPs.
> Having 
> said that, is it possible to get portmap/mountd to bind a different
> NFS 
> daemon to different IPs without the need for virtualization?
> 
> Gordan
> 
> 
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at nongnu.org
> http://lists.nongnu.org/mailman/listinfo/gluster-devel





More information about the Gluster-devel mailing list