# Nfsd, mountd and /etc/exports



## balanga (Oct 17, 2014)

I'm sure I read somewhere that restarting nfsd also restarts mountd, can anyone confirm that is the case?

As I understand it `showmount` will not show the updated contents of /etc/exports until mountd has been restarted. Have I understood this correctly?


----------



## fonz (Oct 17, 2014)

balanga said:


> I'm sure I read somewhere that restarting nfsd also restarts mountd, can anyone confirm that is the case?


/etc/rc.d/nfsd has force_depend entries for rpcbind and mountd, so that should be the case, indeed.



balanga said:


> As I understand it `showmount` will not show the updated contents of /etc/exports until mountd has been restarted. Have I understood this correctly?


showmount only shows what mountd tells it, so you're two for two.


----------



## SirDice (Oct 17, 2014)

No need to restart the service, sending a HUP signal is enough for it to re-read /etc/exports.


----------



## kpa (Oct 17, 2014)

Doing `service mountd reload` sends a HUP signal to the mountd(8) service, easier to remember than using kill(1) directly. If the signals ever change (which I doubt) service will still do the correct thing.


----------



## balanga (Oct 19, 2014)

fonz said:


> /etc/rc.d/nfsd has force_depend entries for rpcbind and mountd, so that should be the case, indeed.
> 
> 
> showmount only shows what mountd tells it, so you're two for two.



I've found that `service nfsd restart` does not update the /etc/exports lists as shown by `showmount`. Any idea what could be causing this?


----------



## junovitch@ (Oct 22, 2014)

balanga said:


> I've found that `service nfsd restart` does not update the /etc/exports lists as shown by `showmount`. Any idea what could be causing this?



It's not nfsd(8)'s job.  It's mountd(8).  As it says above the best way is to do `service mountd reload`


----------

