I have NFSv4 Server (on RHELv6.4) and NFS Clients on (CentOSv6.4). Let's say in /etc/exports:/shares/website1      <ip-client-1>(rw,sync,no_subtree_check,no_root_squash)/shares/website2      <ip-client-2>(rw,sync,no_subtree_check,no_root_squash)Then whenever i made some changes in that (let's say the changes ONLY for client-2), e.g: /shares/website1      <ip-client-1>(rw,sync,no_subtree_check,no_root_squash)/shares/xxxxxxxx      <ip-client-2>(rw,sync,no_subtree_check,no_root_squash)Then i always service nfs restart. And then eventually .. the mount-point on client-1 got unresponsive (Can't open its files, etc). (Why? Because of RESTART?)But as described, i only modified the line for client-2 only. Everything for the client-1 are still untouched.So my questions here are:Whenever i modify the /etc/exports, should i restart the service or what?If i service nfs restart, why the Mount-Point on other Clients are eventually affected? (For those Client Machines with NO changes made in /etc/exports for them.)That means, whenever i make the changes in /etc/exports and restart the service, i will need to go RE-MOUNT the directories on EVERY CLIENTS in the export list, in order to have the mount-points working again.Any idea, please?
NFS Server changes in /etc/exports file need Service Restart?
mount;nfs;services
You shouldn't need to restart NFS every time you make a change to /etc/exports. All that's required is to issue the appropriate command after editing the /etc/exports file:$ exportfs -raExcerpt from the official Red Hat documentation titled: 21.7. The /etc/exports Configuration File.excerptWhen issued manually, the /usr/sbin/exportfs command allows the root user to selectively export or unexport directories without restarting the NFS service. When given the proper options, the /usr/sbin/exportfs command writes the exported file systems to /var/lib/nfs/xtab. Since rpc.mountd refers to the xtab file when deciding access privileges to a file system, changes to the list of exported file systems take effect immediately.Also read the exportfs man page for more details, specifically the DESCRIPTION section which explains all this and more.DESCRIPTION        An  NFS server maintains a table of local physical file systems that are           accessible to NFS clients.  Each file system in this table is  referred           to as an exported file system, or export, for short.  The exportfs command maintains the current table of exports for the NFS     server.  The master export table is kept in  a  file  named    /var/lib/nfs/etab.  This file is read by rpc.mountd when a client sends     an NFS MOUNT request.  Normally  the  master  export  table  is  initialized  with the contents     of /etc/exports and files under /etc/exports.d by invoking exportfs -a.      However, a system administrator can choose to add or delete exports     without modifying  /etc/exports  or  files  under /etc/exports.d by     using the exportfs command.Also take note of the options we're using, -ra:   -a     Export or unexport all directories.   -r     Reexport all directories, synchronizing /var/lib/nfs/etab with           /etc/exports and files  under  /etc/exports.d.   This  option          removes  entries  in  /var/lib/nfs/etab which have been deleted           from /etc/exports or files under /etc/exports.d, and removes          any entries from the kernel export table which are no longer          valid.