Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Aug 2022 11:04:00 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Pete French <pete@twisted.org.uk>, stable@freebsd.org
Subject:   Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!!
Message-ID:  <817221085.13327.1661677440487@localhost>
In-Reply-To: <0bfcccf8-1a40-326a-912a-734f97dffe4f@twisted.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_13326_1183167834.1661677440482
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Van: Pete French <pete@twisted.org.uk>
Datum: 28 augustus 2022 10:16
Aan: stable@freebsd.org
Onderwerp: Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!!

> 
> 
> 
> On 27/08/2022 16:18, Rick Macklem wrote:
> > Ronald Klop <ronald-lists@klop.ws> wrote:
> >> On 8/27/22 00:17, Rick Macklem wrote:
> >>> Ganbold Tsagaankhuu <ganbold@gmail.com> wrote:
> >>>>> Rick,
> >>>>>
> >>>>> On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem > ><rmacklem@uoguelph.ca<mailto:rmacklem@uoguelph.ca>> wrote:
> >>> Ganbold Tsagaankhuu <ganbold@gmail.com<mailto:ganbold@gmail.com>> wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> We are having trouble with NFS running on STABLE:
> >>>>>>
> >>>>>> Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session srvslot=1 slot=0
> >>> [stuff snipped]
> >>>>>> Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session srvslot=1 slot=0
> >>>>>> Aug 26 02:22:46 iron2 kernel: freeing free slot!!
> >>>>>>
> >>>>>> We are running FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea: Fri Aug 26 01:51:53 UTC 2022 and mount options are:
> >>>>>>
> >>>>>> rw,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5
> >>>>>> ro,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5
> >>>>>>
> >>>>>> Is there any fix for this issue?
> >>> Oh, and one more thing. If you have multiple clients mounting the
> >>> NFSv4 server, make sure they all have unique hostids.
> >>> Check /etc/hostid and "sysctl kern.hostuuid". If two clients have the
> >>> same kern.hostuuid, there will be lots of trouble.
> >>>
> >>> rick
> >>
> >> Just a thought. Is it possible/easy to warn about double used hostuuids >from different client IP addresses?
> >> Although that will not help this person using Netapp as a server.
> > I don't think so. Same hostuuid implies same system, so how does a
> > server know they are two different systems?
> > - A client could have multiple IP host addresses, so different client
> >    host IP addresses for a TCP connection does not imply different systems.
> >
> > I can, however, modify the console message the server generates when
> > it sees a session has been replaced to include "check clients have
> > unique hostuuids", which might help.
> >
> > I also plan on adding a sentence to "man mount_nfs" about this,
> > since I just had an email discussion with someone else where the
> > problem turned out to be "same hostuuids for multiple clients"
> > and the loss of sessions on the FreeBSD server was the hint that
> > clued me in.
> >
> > At least I now know this configuration issue exists.
> >
> > rick
> >
> > Regards,
> > Ronald.
> >
> 
> It well worth adding this I think. I didnt realise this about NFSv4, and I do a lot with cloud machines, where I simply clone the discs, and thus ended up with many machines with the same hostid. Took me a while to work out why my NFS was havign issues...
> 
> 
> -pete.
> 
> 
> 
> 
> 
> 




It might help this case if the nfs client combined hostid+ip as a client id. Or include mac address. People tend to change the mac after a clone.


Regards,
Ronald
------=_Part_13326_1183167834.1661677440482
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body><br /><p><small><strong>Van:</strong> Pete French &lt;pete@twisted.org.uk&gt;<br /><strong>Datum:</strong> 28 augustus 2022 10:16<br /><strong>Aan:</strong> stable@freebsd.org<br /><strong>Onderwerp:</strong> Re: double used hostuuids - Re: NFS issue - newnfs_request: Wrong session srvslot=1 slot=0, freeing free slot!!<br /></small></p><blockquote style="margin-left: 5px; border-left: 3px solid #ccc; margin-right: 0px; padding-left: 5px;"><div class="MessageRFC822Viewer do_not_remove" id="P"><!-- P -->
<!-- processMimeMessage --><div class="TextPlainViewer do_not_remove" id="P.P"><!-- P.P --><br />
On 27/08/2022 16:18, Rick Macklem wrote:<br />
&gt; Ronald Klop &lt;ronald-lists@klop.ws&gt; wrote:<br />
&gt;&gt; On 8/27/22 00:17, Rick Macklem wrote:<br />
&gt;&gt;&gt; Ganbold Tsagaankhuu &lt;ganbold@gmail.com&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt; Rick,<br />
&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt; On Fri, Aug 26, 2022 at 11:18 AM Rick Macklem &gt; &gt;&lt;rmacklem@uoguelph.ca&lt;mailto:rmacklem@uoguelph.ca&gt;&gt; wrote:<br />
&gt;&gt;&gt; Ganbold Tsagaankhuu &lt;ganbold@gmail.com&lt;mailto:ganbold@gmail.com&gt;&gt; wrote:<br />
&gt;&gt;&gt;&gt;&gt;&gt; Hi,<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; We are having trouble with NFS running on STABLE:<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Aug 26 02:21:42 iron2 kernel: newnfs_request: Wrong session srvslot=1 slot=0<br />
&gt;&gt;&gt; [stuff snipped]<br />
&gt;&gt;&gt;&gt;&gt;&gt; Aug 26 02:22:46 iron2 kernel: newnfs_request: Wrong session srvslot=1 slot=0<br />
&gt;&gt;&gt;&gt;&gt;&gt; Aug 26 02:22:46 iron2 kernel: freeing free slot!!<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; We are running FreeBSD 13.1-STABLE #3 stable/13-n252198-c1434fd2dea: Fri Aug 26 01:51:53 UTC 2022 and mount options are:<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; rw,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5<br />
&gt;&gt;&gt;&gt;&gt;&gt; ro,nfsv4,minorversion=1,bg,soft,timeo=20,retrans=5,retrycnt=5<br />
&gt;&gt;&gt;&gt;&gt;&gt;<br />
&gt;&gt;&gt;&gt;&gt;&gt; Is there any fix for this issue?<br />
&gt;&gt;&gt; Oh, and one more thing. If you have multiple clients mounting the<br />
&gt;&gt;&gt; NFSv4 server, make sure they all have unique hostids.<br />
&gt;&gt;&gt; Check /etc/hostid and &quot;sysctl kern.hostuuid&quot;. If two clients have the<br />
&gt;&gt;&gt; same kern.hostuuid, there will be lots of trouble.<br />
&gt;&gt;&gt;<br />
&gt;&gt;&gt; rick<br />
&gt;&gt;<br />
&gt;&gt; Just a thought. Is it possible/easy to warn about double used hostuuids &gt;from different client IP addresses?<br />
&gt;&gt; Although that will not help this person using Netapp as a server.<br />
&gt; I don't think so. Same hostuuid implies same system, so how does a<br />
&gt; server know they are two different systems?<br />
&gt; - A client could have multiple IP host addresses, so different client<br />
&gt; &nbsp;&nbsp;&nbsp;host IP addresses for a TCP connection does not imply different systems.<br />
&gt;<br />
&gt; I can, however, modify the console message the server generates when<br />
&gt; it sees a session has been replaced to include &quot;check clients have<br />
&gt; unique hostuuids&quot;, which might help.<br />
&gt;<br />
&gt; I also plan on adding a sentence to &quot;man mount_nfs&quot; about this,<br />
&gt; since I just had an email discussion with someone else where the<br />
&gt; problem turned out to be &quot;same hostuuids for multiple clients&quot;<br />
&gt; and the loss of sessions on the FreeBSD server was the hint that<br />
&gt; clued me in.<br />
&gt;<br />
&gt; At least I now know this configuration issue exists.<br />
&gt;<br />
&gt; rick<br />
&gt;<br />
&gt; Regards,<br />
&gt; Ronald.<br />
&gt;<br />
<br />
It well worth adding this I think. I didnt realise this about NFSv4, and I do a lot with cloud machines, where I simply clone the discs, and thus ended up with many machines with the same hostid. Took me a while to work out why my NFS was havign issues...<br />
<br />
<br />
-pete.<br />
<br />
<br />
</div><!-- TextPlainViewer -->
<hr />
</div><!-- MessageRFC822Viewer -->
</blockquote><br /><br /><br /><div>It might help this case if the nfs client combined hostid+ip as a client id. Or include mac address. People tend to change the mac after a clone.</div><div><br /></div><div>Regards,</div><div>Ronald</div></body></html>
------=_Part_13326_1183167834.1661677440482--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?817221085.13327.1661677440487>