2005-01-31 07:41:34

by mehta kiran

[permalink] [raw]
Subject: lockd grace period

Hi ,
lockd is used by both nfs and autofs
if there are 2 machines runnnig 2.6 kernel
(Red Hat) .autofs and nfs both are running
on system1.When nfs is failed over to system2
, all daemons start on system2 , but
lockd on system1 is still alive as it is required
by autofs "client"(this machine has automounted
filesystem from some other machine).After say 5
minutes , if nfs
is failed over to system1 , lockd recovery
gives some problem.statd notifies client ,
but when client tries to reclaim lock ,
LOCK routine returns "unknown error"(30000).
Is is because , lockd was runnnig since long
time on system1 and hence its grace period was over.

But I dont face same problem of sles9 sp1.
What is the expected behaviour.?
Is it that whenever nfsd starts , lockd should enter
grace period ?
or
Is is that lockd should enter grace period only when
it restarts without caring for nfs.?

--thanks,
kiran





__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2005-01-31 12:31:05

by Steve Dickson

[permalink] [raw]
Subject: Re: lockd grace period



mehta kiran wrote:

>What is the expected behaviour.?
>Is it that whenever nfsd starts , lockd should enter
>grace period ?
>or
>Is is that lockd should enter grace period only when
>it restarts without caring for nfs.?
>
>
Yes and Yes... When a NFS server is restarted, there is a grace
period in which the server (i.e. lockd) will accept reclaimed locks.
And it appears that reclaimed locks will also be accepted after
the grace period expires so its not clear who and how that
error is being generated....

steved.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

Subject: RE: lockd grace period

Steved wrote :

> Yes and Yes... When a NFS server is restarted, there is a grace period
in which the server (i.e. lockd) will accept reclaimed locks.
> And it appears that reclaimed locks will also be accepted after the
grace period expires=20

I think reclaim locks should not be accepted after the grace period
expires, because it can cause data corruption.

Say, a reclaim request arrives after grace period and get's lock. There
will be time frame between end of grace period and arrival of
Reclaim request, in which case any thing can happen(ex: a new request
could be granted, it may make some changes to a file and unlock by the
time Reclaim arrives).

In which case reclaim thinks that it was the same original file it had
last locked.

So reclaim after grace period is not a good idea.

Mehta's question :

>What is the expected behaviour.?
>Is it that whenever nfsd starts , lockd should enter grace period ?
>or
>Is is that lockd should enter grace period only when it restarts=20
>without caring for nfs.?

The lockd should enter grace period whenever nfsd starts/restarts.

~Chetan


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 14:36:21

by mehta kiran

[permalink] [raw]
Subject: RE: lockd grace period

Hi ,
this means that if lockd alone is running
since a long time and if now i start nfsd , lockd will
enter grace period and hence reclaim request
will only be served for grace period interval

In example given by chetan :
I think if reclaim request arrive after grace
period,it will be considered as normal lock request ,
and if lock has already been acquired by some other
client (between grace period end and request arrival)
, appropriate error will be returned to
requestor.

--thanks ,
kiran


--- "Aswathanarayana, Chetan (STSD)"
<[email protected]> wrote:

> Steved wrote :
>
> > Yes and Yes... When a NFS server is restarted,
> there is a grace period
> in which the server (i.e. lockd) will accept
> reclaimed locks.
> > And it appears that reclaimed locks will also be
> accepted after the
> grace period expires
>
> I think reclaim locks should not be accepted after
> the grace period
> expires, because it can cause data corruption.
>
> Say, a reclaim request arrives after grace period
> and get's lock. There
> will be time frame between end of grace period and
> arrival of
> Reclaim request, in which case any thing can
> happen(ex: a new request
> could be granted, it may make some changes to a file
> and unlock by the
> time Reclaim arrives).
>
> In which case reclaim thinks that it was the same
> original file it had
> last locked.
>
> So reclaim after grace period is not a good idea.
>
> Mehta's question :
>
> >What is the expected behaviour.?
> >Is it that whenever nfsd starts , lockd should
> enter grace period ?
> >or
> >Is is that lockd should enter grace period only
> when it restarts
> >without caring for nfs.?
>
> The lockd should enter grace period whenever nfsd
> starts/restarts.
>
> ~Chetan
>




__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 14:56:28

by Steve Dickson

[permalink] [raw]
Subject: Re: lockd grace period

Aswathanarayana, Chetan (STSD) wrote:

>Say, a reclaim request arrives after grace period and get's lock. There
>will be time frame between end of grace period and arrival of
>Reclaim request, in which case any thing can happen(ex: a new request
>could be granted, it may make some changes to a file and unlock by the
>time Reclaim arrives).
>
>
Nobody is saying this NLM protocol or method of recovery is perfect....
;-) This
is one of many reasons why the locking protocol is not integrated with the
NFSv4 protocol...

steved.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 14:59:50

by Steve Dickson

[permalink] [raw]
Subject: Re: lockd grace period



mehta kiran wrote:

>Hi ,
> this means that if lockd alone is running
>since a long time and if now i start nfsd ,
>
hmm... why would you ever have lockd running "alone"?
Meaning what good is it w/out rpc.nfsd? Also how are
you doing that since one of the first things rpc.nfsd does
is bring up lockd().....

steved.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 15:02:07

by mehta kiran

[permalink] [raw]
Subject: Re: lockd grace period

Hi ,
but can u please let me know whether
lockd which has been running before nfsd started
will enter grace period or not
and will only server reclaim request ot not
thanks ,
kiran
--- Steve Dickson <[email protected]> wrote:

> Aswathanarayana, Chetan (STSD) wrote:
>
> >Say, a reclaim request arrives after grace period
> and get's lock. There
> >will be time frame between end of grace period and
> arrival of
> >Reclaim request, in which case any thing can
> happen(ex: a new request
> >could be granted, it may make some changes to a
> file and unlock by the
> >time Reclaim arrives).
> >
> >
> Nobody is saying this NLM protocol or method of
> recovery is perfect....
> ;-) This
> is one of many reasons why the locking protocol is
> not integrated with the
> NFSv4 protocol...
>
> steved.
>
>




__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 15:10:03

by mehta kiran

[permalink] [raw]
Subject: Re: lockd grace period

Hi ,
lockd can run alone if this machine also acts
as nfs client of some other (third machine)
Clients side only require lockd and rpciod , right
thanks,
kiran
--- Steve Dickson <[email protected]> wrote:

>
>
> mehta kiran wrote:
>
> >Hi ,
> > this means that if lockd alone is
> running
> >since a long time and if now i start nfsd ,
> >
> hmm... why would you ever have lockd running
> "alone"?
> Meaning what good is it w/out rpc.nfsd? Also how are
> you doing that since one of the first things
> rpc.nfsd does
> is bring up lockd().....
>
> steved.
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW --
> Interactive Reporting
> Tool for open source databases. Create drag-&-drop
> reports. Save time
> by over 75%! Publish reports on the web. Export to
> DOC, XLS, RTF, etc.
> Download a FREE copy at
> http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>




__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 15:59:19

by Steve Dickson

[permalink] [raw]
Subject: Re: lockd grace period

mehta kiran wrote:

>Hi ,
> lockd can run alone if this machine also acts
>as nfs client of some other (third machine)
>Clients side only require lockd and rpciod , right
>
>
hmm... I always think of lockd being a server only process...
but indeed it is started for callbacks and reclaims on the client side so
so point taken... I guess what threw me was the idea of lockd
running "alone".... lockd never runs along (i.e. w/out
some type of NFS activity)....

So your question is, when there is already an active NFS mount
(which would bring up lockd()) and then NFS server is started
will lockd() have a grace period. From what I see the answer
is no. Probably because the its expected that the server will
be started before any NFS would occur which does occur
99% of the time....

steved.



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-01-31 23:08:04

by Dan Stromberg

[permalink] [raw]
Subject: Re: lockd grace period

On Mon, 2005-01-31 at 09:58 -0500, Steve Dickson wrote:
> Aswathanarayana, Chetan (STSD) wrote:
>
> >Say, a reclaim request arrives after grace period and get's lock. There
> >will be time frame between end of grace period and arrival of
> >Reclaim request, in which case any thing can happen(ex: a new request
> >could be granted, it may make some changes to a file and unlock by the
> >time Reclaim arrives).
> >
> >
> Nobody is saying this NLM protocol or method of recovery is perfect....
> ;-) This
> is one of many reasons why the locking protocol is not integrated with the
> NFSv4 protocol...
>
> steved.

I thought finally integrating locking into the protocol was supposed to
be a "feature" of NFSv4?



Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2005-01-31 23:58:15

by Trond Myklebust

[permalink] [raw]
Subject: Re: lockd grace period

m=E5 den 31.01.2005 Klokka 15:07 (-0800) skreiv Dan Stromberg:

> I thought finally integrating locking into the protocol was supposed to
> be a "feature" of NFSv4?

Yes, it is, but note that the way NFSv4 does locking is VERY different
from NLM (particularly so in the way it handles client and server
reboot) due to the fact that it is based on the concept of leases.

I assume that is what Steve meant to say.

Cheers,
Trond

--=20
Trond Myklebust <[email protected]>



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-02-01 03:05:02

by Steve Dickson

[permalink] [raw]
Subject: Re: lockd grace period



Dan Stromberg wrote:

>On Mon, 2005-01-31 at 09:58 -0500, Steve Dickson wrote:
>
>
>>Aswathanarayana, Chetan (STSD) wrote:
>>
>>
>>
>>>Say, a reclaim request arrives after grace period and get's lock. There
>>>will be time frame between end of grace period and arrival of
>>>Reclaim request, in which case any thing can happen(ex: a new request
>>>could be granted, it may make some changes to a file and unlock by the
>>>time Reclaim arrives).
>>>
>>>
>>>
>>>
>>Nobody is saying this NLM protocol or method of recovery is perfect....
>>;-) This
>>is one of many reasons why the locking protocol is not integrated with the
>>NFSv4 protocol...
>>
>>steved.
>>
>>
>
>I thought finally integrating locking into the protocol was supposed to
>be a "feature" of NFSv4?
>
>
My bad... s/is not/is/

steved.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-02-01 10:46:16

by mehta kiran

[permalink] [raw]
Subject: Re: lockd grace period

Hi ,
I verified that suse NFS server enters
grace period whenever nfsd starts , irrespective
of whether lockd was already runnnig or not.
While Red Hat NFS server (RHEL 4 pre_rc2) does
not restart grace period of already running
lockd , even if nfsd restarts.

**Can anybody let me know what the standard behaviour
should be. ??

What i think is that suse does it right by restarting
nfs grace period of already running lockd.
This is because machine acting as nfs server
can definitely act as nfs client of some other
machine(though rare but occurs).

Will nfs developers from Suse "also" like to comment
on this?

thanks,
-- kiran

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

Subject: RE: Re: lockd grace period

Mehta kiran wrote :=20

>**Can anybody let me know what the standard behaviour
> should be. ??

I think lockd should enter grace period, in the current scenario.

But I would like the lockd to be transparent to nfs client and nfs
server.
In that way it can act as client and server transparently.
Would that be a better way than existing one ?

~Chetan


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-02-01 14:50:57

by Ara.T.Howard

[permalink] [raw]
Subject: Re: Re: lockd grace period

On Tue, 1 Feb 2005, mehta kiran wrote:

> What i think is that suse does it right by restarting nfs grace period of
> already running lockd. This is because machine acting as nfs server can
> definitely act as nfs client of some other machine(though rare but occurs).

for us it is not rare; we do it all the time. do i understand correctly; that
the result of NOT re-entering grace period in servant mode would be failure to
re-claim locks?

cheers.

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself. --Shunryu Suzuki
===============================================================================


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-02-01 15:13:49

by mehta kiran

[permalink] [raw]
Subject: Re: Re: lockd grace period

Hi Ara ,
what is servant mode ?
what i am saying is that if machine1
is acting as NFS server than it allows client

to reclaim lock when lockd restarts.
machine1 is also NFS client
of some other server. if NFS server on
machine1 goes down , lockd wont be killed
as NFS client on machine1 requires it.

Later , if NFS server is restarted on
machine1 , lockd wont restart(already running)
and hence does not enter grace period.

Let me know if i am not clear

regards,
--kiran

--- "Ara.T.Howard" <[email protected]> wrote:

> On Tue, 1 Feb 2005, mehta kiran wrote:
>
> > What i think is that suse does it right by
> restarting nfs grace period of
> > already running lockd. This is because machine
> acting as nfs server can
> > definitely act as nfs client of some other
> machine(though rare but occurs).
>
> for us it is not rare; we do it all the time. do i
> understand correctly; that
> the result of NOT re-entering grace period in
> servant mode would be failure to
> re-claim locks?
>
> cheers.
>
> -a
> --
>
===============================================================================
> | EMAIL :: Ara [dot] T [dot] Howard [at] noaa
> [dot] gov
> | PHONE :: 303.497.6469
> | When you do something, you should burn yourself
> completely, like a good
> | bonfire, leaving no trace of yourself. --Shunryu
> Suzuki
>
===============================================================================
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW --
> Interactive Reporting
> Tool for open source databases. Create drag-&-drop
> reports. Save time
> by over 75%! Publish reports on the web. Export to
> DOC, XLS, RTF, etc.
> Download a FREE copy at
> http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2005-02-01 16:58:51

by Ara.T.Howard

[permalink] [raw]
Subject: Re: Re: lockd grace period

On Tue, 1 Feb 2005, mehta kiran wrote:

> what is servant mode ?

client AND server => servant

> what i am saying is that if machine1 is acting as NFS server than it
> allows client to reclaim lock when lockd restarts. machine1 is also
> NFS client of some other server. if NFS server on machine1 goes down ,
> lockd wont be killed as NFS client on machine1 requires it.
>
> Later , if NFS server is restarted on machine1 , lockd wont
> restart(already running) and hence does not enter grace period.
>
> Let me know if i am not clear

this is clear now. thanks!

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself. --Shunryu Suzuki
===============================================================================


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs