Saturday, August 26, 2017

Re: mount_nfs(8) -b option

Hi Alessandro,

Am 15. August 2017 15:57:01 MESZ schrieb Alessandro DE LAURENZIS <just22@atlantide.t28.net>:
>Dear misc@ readers,
>
>From mount_nfs(8):
>
> -b If an initial attempt to contact the server fails, fork off a
> child to keep trying the mount in the background. Useful for
> fstab(5), where the file system mount is not critical to
> multiuser operation.
>
>My understanding is that, in case the server is not reachable when the
>command is run (specifically, at boot, if there is a proper entry in
>fstab(5)), it will be forked and keep trying the mount operation, till
>when the server is back.
>
>I had a look at the code and, if I am not mistaken, the process sleeps
>for 60s, then retries and so on.
>
>Now: this is my fstab:
>
># Blk dev Mount point FS type Mnt opts Dump freq Pass
>no.
> […]
> # Network file sharing
>egeo:/vol/datavol01 /nfs/egeo/vol/datavol01 nfs net,rw,-i,-b 0 0
>[…]
>
>I observe two unexpected behaviors:
>
>1) when I switch on the machine in an environment without any network
>available, I see the messages "Cannot resolve egeo..." and the boot
>process goes on; but when the server comes back (I simply make a wifi
>network available and run "doas sh /etc/netstart" on the client),
>nothing happens (I was instead expecting that the shares were mounted
>after a minute or so);
>
>2) when I boot without any network available and removing the "-b"
>option from the client's fstab, again I see the messages "Cannot
>resolve
>egeo...", and again the process continues without lagging...
>[…]

In case nobody pointed this out off-list:
You should add your fileserver's IP to to
your /etc/hosts so its name can be
resolved during boot when there's no
DNS available (or you're outside your
LAN).

Regards, Florian

No comments:

Post a Comment