I found out NFS is the best way for Multi Server setup in Drupal File sharing
Can someone tell me how this works.
I have two Servers with Drupal Files connected to a common db in third Server
I have one more Server for files how shall I link this too both Drupal Servers using NFS and how NFS works?
when a user uploads the file from first drupal server does it make a copy in Shared Server or makes a
symbolic(soft) link in both drupal servers and adds the file in shared server?
Can someone please tell me and pass me a link to implement NFS for my MultiServer Drupal Setup.
Let us assume Server-A (ip: a.a.a.a) is the server where you are going to save the files, Server-B(ip: b.b.b.b) and Server-C (ip: c.c.c.c) will have drupal. In Server-A you may be storing the files in /store folder. This is to be mounted to folder /mnt/store in Server-B and Server-c.
For this you need to install nfs-kernal-server in Server-A and nfs-common and portmap on all three servers. NFS relies upon Remote Procedure Call(RPC) and portmap service is required to map RPC requests to the correct services.
In Server-A do these configurations:
sudo vi /etc/default/nfs-kernel-server
in this file setNEED_SVCGSSD=no
sudo vi /etc/default/nfs-common
in this file set:NEED_IDMAPD=yes
andNEED_GSSD=no
sudo vi /etc/idmapd.conf
in this file under[Mapping]
setNobody-User = nobody
andNobody-Group = nogroup
sudo vi /etc/hosts.deny
add this:portmap mountd nfsd statd lockd rquotad : ALL
sudo vi /etc/hosts.allow
add this:portmap mountd nfsd statd lockd rquotad : b.b.b.b, c.c.c.c
{ipaddresses}sudo vi /etc/exports
add this:/mnt/nfstest b.b.b.b(rw,sync,no_subtree_check,fsid=0)
and/mnt/nfstest c.c.c.c(rw,sync,no_subtree_check,fsid=0)
In Server-B and Server-C do this
sudo vi /etc/hosts.allow
SET:portmap : a.a.a.a
{Server-A's ipaddress}sudo vi /etc/default/nfs-common
SET:NEED_IDMAPD=yes
andNEED_GSSD=no
sudo vi /etc/idmapd.conf
under[Mapping]
addNobody-User = nobody
andNobody-Group = nogroup