public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] NFS tutorial for the brain dead sysadmin?
Date: Sat, 26 Jul 2014 15:51:53 +0200	[thread overview]
Message-ID: <53D3B279.6030906@gmail.com> (raw)
In-Reply-To: <lqv4ri$osk$1@ger.gmane.org>

On 26/07/2014 04:47, walt wrote:
> In this case, the brain dead sysadmin would be moi :)
> 
> For years I've been using NFS to share /usr/portage with all of the
> gentoo machines on my LAN.
> 
> Problem:  occasionally it stops working for no apparent reason.
> 
> Example:  two days ago I updated two ~amd64 gentoo machines, both of
> which have been mounting /usr/portage as NFS3 shares for at least a
> year with no problems.
> 
> One machine worked normally after the update, the other was unable to
> mount /usr/portage because rpc.statd wouldn't start correctly.
> 
> After two frustrating days I discovered that I had never enabled the
> rpcbind.service on the "broken" machine.  So I enabled rpcbind, which
> fixed the breakage.
> 
> So, why did the "broken" machine work normally for more than a year
> without rpcbind until two days ago?  (I suppose because nfs-utils was
> updated to 1.3.0 ?)
> 
> The real problem here is that I have no idea how NFS works, and each
> new version is more complicated because the devs are solving problems
> that I don't understand or even know about.
> 
> So, please, what's the best way to learn and understand NFS?


I think you are asking for the impossible :-)

NFS is not easy to set up, and even harder to describe. It is easy to
*use* once it's set up correctly - you just mount something and the only
difference to a local mount is you add an IP address.

NFS uses RPC to do some heavy lifting - I don't know how familiar you
are with this, so here's the quick version:

When you mount something locally, and need to use the mounted
filesystem, kernel calls are used to get at the data. This works easily
as the source disk is local and the kernel can get to it. With NFS, the
source disk is remote and it's the remote kernel that must do the
accessing. RPC is a way to safely ask a remote kernel to do something
and get a result that behaves identical to a local kernel call.
Obviously, this is rather hard to implement correctly.

The original RPC was written by Sun and other newer implementations
exist, like libtirpc - to support useful features like not being stuck
with only UDP. That's what the "ti" means - Transport Independant.

RPC has been in a state of flux for some time and I too have run into
init-script oddities as things change.

In my case, I have nfs-utils-1.3.0, and rc-update configuredd to start
rpc.statd. This works because

depend() {
        ...
        need portmap
        ...
}

and in the init.d file for rpcbind:

depend() {
        ...
        provide portmap
}

So rpcbind starts at boot time and all my nfs mounts JustWork

Looks to me like your problem is actually with rpc and more specifically
with what things are currently named today (which could be different to
yesterday). Unfortunately I don't know of a place where this is all
nicely described in a sane manner except inside the init files themselves.



-- 
Alan McKinnon
alan.mckinnon@gmail.com



  reply	other threads:[~2014-07-26 13:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26  2:47 [gentoo-user] NFS tutorial for the brain dead sysadmin? walt
2014-07-26 13:51 ` Alan McKinnon [this message]
2014-07-27 14:30   ` Tom H
2014-07-27 16:25 ` Stefan G. Weichinger
2014-07-27 16:55   ` J. Roeleveld
2014-07-27 19:44     ` Kerin Millar
2014-07-28 13:58       ` J. Roeleveld
2014-07-28 15:29         ` behrouz khosravi
2014-07-28 15:57           ` Neil Bothwick
2014-07-29  7:49             ` behrouz khosravi
2014-07-29  8:15               ` Peter Humphrey
2014-07-29  8:23                 ` behrouz khosravi
2014-07-27 17:07   ` Stefan G. Weichinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D3B279.6030906@gmail.com \
    --to=alan.mckinnon@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox