Problems Re-Starting mountd

Rick Macklem rmacklem at uoguelph.ca
Thu Jan 3 02:39:36 UTC 2013


Tim Gustafson wrote:
> Hi,
> 
> Our /etc/exports file contains two lines for each user (one export for
> network "A", and one network for export "B"), and is about 3,200 line
> long.
> 
> Re-starting mountd takes several minutes:
> 
> /etc/rc.d/mountd restart
> 
> Re-loading mountd returns immediately, but new mounts are blocked for
> the same duration of time, at least several minutes.
> 
Wow, I wouldn't have expected several minutes. Reloading the exports isn't
a lightweight activity, but it doesn't do that much work.

All I can think of is that the syscall doing the exports is getting stuck
waiting for mnt_explock, which is needs to hold exclusively, while every
RPC grabs it as a shared lock.

You could try this patch, that went into head and stable/9 recently.
  http://people.freebsd.org/~rmacklem/atomic-export.patch
It adds a new option to mountd that suspends execution of the nfsd threads
while it is reloading the exports. The object was to avoid clients from
getting transient access errors, but in this case it might allow the
reload to happen a lot more quickly. (If it still takes minutes when this
patch/option is used, I have no idea why it would take so long.)

Alternately, switching from mountd to nfse might be worth considering.

Good luck with it, rick

> /etc/rc.d/mountd reload
> 
> Is there any way to speed up reloading the mountd configuration? It's
> so slow that we basically can't add exports during the day because the
> reload takes so long that some users get failed mounts when they log
> in during a reload.
> 
> --
> 
> Tim Gustafson
> tjg at soe.ucsc.edu
> 831-459-5354
> Baskin Engineering, Room 313A
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list