Linux NFS development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: daggs <daggs@gmx.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: unable to mount nfs4 mount
Date: Wed, 04 Jan 2017 14:18:07 +1100	[thread overview]
Message-ID: <87h95fms28.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <trinity-02157c25-8763-4394-ad29-2b05c954f503-1482778484415@3capp-mailcom-bs02>

[-- Attachment #1: Type: text/plain, Size: 3842 bytes --]

On Tue, Dec 27 2016, daggs wrote:

> Greetings Neil,
>
>> On Mon, Dec 26 2016, daggs wrote:
>> 
>> > Greetings,
>> >
>> >> On Mon, Dec 26 2016, daggs wrote:
>> >> 
>> >> >> Can you strace mountd while you attempt a mount?
>> >> >> e.g.
>> >> >>   strace -o /tmp/trace -s 1000 -p 241
>> >> >> 
>> >> >> and send the /tmp/trace.
>> >> >> Also, after the attempt fails, run
>> >> >>  rpcdebug -m rpc -s cache
>> >> >>  grep . /proc/net/rpc/*/c*
>> >> >>  cat /proc/fs/nfsd/exports
>> >> >> 
>> >> >> and report the output.
>> >> >> 
>> >> > here:
>> >> >
>> >> > # cat /tmp/trace
>> >> > pselect6(1024, [3 4 5 7 8 9 10 11 12], NULL, NULL, NULL, NULL) = 1 (in [3])
>> >> > read(3, "nfsd 10.0.0.1\n", 32768)       = 14
>> >> > openat(AT_FDCWD, "/run/nfs/etab", O_RDONLY) = 14
>> >> > fstat(14, {st_mode=S_IFREG|0644, st_size=435, ...}) = 0
>> >> > close(14)                               = 0
>> >> > write(3, "nfsd 10.0.0.1 2079 10.0.0.0/24 \n", 32) = 32
>> >> 
>> >> This is weird.
>> >> Here mountd is telling nfsd that when a request comes from IP address
>> >> 10.0.0.1, it should look for export entries associated with the client
>> >> name "10.0.0.0/24", which is good.
>> >> However the expiry time for that information is "2079", which is back in
>> >> January 1970.
>> >> When mountd writes that number, it computes it as
>> >>    time(0) + DEFAULT_TTL
>> >> where DEFAULT_TTL is (30 * 60)
>> >> Which suggests time(0) is "279".
>> >> 
>> >> What is the current time on this system?
>> >> 
>> >> If it really was very early on Jan 1st 1970, it should work, however...
>> >> 
>> >> 
>> >> > pselect6(1024, [3 4 5 7 8 9 10 11 12], NULL, NULL, NULL, NULL <detached ...>
>> >> > # rpcdebug -m rpc -s cache
>> >> > rpc        cache
>> >> > # grep . /proc/net/rpc/*/c*
>> >> > /proc/net/rpc/auth.unix.gid/content:#uid cnt: gids...
>> >> > /proc/net/rpc/auth.unix.ip/channel:nfsd 10.0.0.1
>> >> > /proc/net/rpc/auth.unix.ip/channel:nfsd 10.0.0.1
>> >> > /proc/net/rpc/auth.unix.ip/content:#class IP domain
>> >> > /proc/net/rpc/auth.unix.ip/content:# expiry=2079 refcnt=1 flags=1
>> >> > /proc/net/rpc/auth.unix.ip/content:# nfsd 10.0.0.1 10.0.0.0/24
>> >> 
>> >> ...the fact that this line is commented out indicates that the entry in
>> >> the cache is already expired.  So the time must be after 2079.
>> >> 
>> >> Maybe the time is getting set from the network at an awkward time that
>> >> races with NFS service some how.
>> >> Can you find a way to run "exportfs -f" after the time has been set
>> >> correctly?
>> >> 
>> >> NeilBrown
>> >> 
>> >> 
>> >
>> > wait, I think I've seen this somewhere, does this feature needs rtc? this board doesn't have rtc component.
>> > for example, I cannot use openssh as ssh server because it needs rtc. I have to use dropbear.
>> > if so, this looks like it will affect nfsv3 mounts, am I right?
>> 
>> No, you shouldn't need an RTC.
>> You need the synchronize the clock with ntp or similar, else time stamps
>> on files will look wrong.
>> Though I think we fixed issues with wall-clock-time jumping in 2.6.37...
>> 
>> If you could try using "exportfs -f", and explain what does happen with
>> time - do you use ntp ?? - we might be able to make progress.
>
> I'll build ntp into the image and try. does this affects nfsv3 too?

Having correct time is quite important for any version of NFS.  With out
it, time stamps on files get confused.  "make" doesn't cope at all,
"tar" often complains, other tools might experience other problems.

I still cannot quite see why having an incorrect clock would cause the
particular symptoms you are experiencing, but it is worth fixing anyway.

>
> what should I do with the "exportfs -f"? jsut run it and retry?

Yes.

NeilBrown

>
> Thanks,
>
> Dagg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-01-04  3:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 13:12 unable to mount nfs4 mount daggs
2016-12-24  3:29 ` NeilBrown
2016-12-24  7:11   ` daggs
2016-12-24 19:41     ` NeilBrown
2016-12-24 19:52       ` daggs
2016-12-25  1:20         ` NeilBrown
2016-12-25 20:09           ` daggs
2016-12-25 20:33             ` NeilBrown
2016-12-26  7:48               ` daggs
2016-12-26 11:19                 ` NeilBrown
2016-12-26 18:54                   ` daggs
2017-01-04  3:18                     ` NeilBrown [this message]
2017-01-06 12:33                       ` daggs
2017-01-07  3:14                         ` NeilBrown
2017-02-03 13:31                           ` daggs

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=87h95fms28.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=daggs@gmx.com \
    --cc=linux-nfs@vger.kernel.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