All of lore.kernel.org
 help / color / mirror / Atom feed
* Question abount sm-notify when use NFSv3 lock
@ 2022-07-06 12:28 jie wang
  2022-07-06 14:39 ` Benjamin Coddington
  0 siblings, 1 reply; 4+ messages in thread
From: jie wang @ 2022-07-06 12:28 UTC (permalink / raw)
  To: linux-nfs

Hi, all
  When we use NFSv3, we have a LoadBalance in front of NFS server. For
example, LoadBalance's ip is ip2 and NFS server's ip is ip1, and
client use ip2 to mount.

  Now client use flock to lock file, then I restart NFS server and
execute sm-notify -f. Then the problem occurs, the sm-notify request's
src ip is ip1, not ip2, so rpc.statd will ignore this notify, because
it does not match ip2 when mount, so client will not reclaim lock, and
lock lost when restart NFS server.

  Do you know how to address this ? Thanks a lot.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question abount sm-notify when use NFSv3 lock
  2022-07-06 12:28 Question abount sm-notify when use NFSv3 lock jie wang
@ 2022-07-06 14:39 ` Benjamin Coddington
  2022-07-06 23:56   ` jie wang
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Coddington @ 2022-07-06 14:39 UTC (permalink / raw)
  To: jie wang; +Cc: linux-nfs

On 6 Jul 2022, at 8:28, jie wang wrote:

> Hi, all
>   When we use NFSv3, we have a LoadBalance in front of NFS server. For
> example, LoadBalance's ip is ip2 and NFS server's ip is ip1, and
> client use ip2 to mount.
>
>   Now client use flock to lock file, then I restart NFS server and
> execute sm-notify -f. Then the problem occurs, the sm-notify request's
> src ip is ip1, not ip2, so rpc.statd will ignore this notify, because
> it does not match ip2 when mount, so client will not reclaim lock, and
> lock lost when restart NFS server.
>
>   Do you know how to address this ? Thanks a lot.

The sm-notify(8) man page shows you can use '-v' to specify an ipaddr or
hostname.

Ben


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question abount sm-notify when use NFSv3 lock
  2022-07-06 14:39 ` Benjamin Coddington
@ 2022-07-06 23:56   ` jie wang
       [not found]     ` <CACt_J9NtB5+1MiL8JrNbyLf6uhgHWDYmyAtKgmKdhzMkgL9E5g@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: jie wang @ 2022-07-06 23:56 UTC (permalink / raw)
  To: Benjamin Coddington; +Cc: linux-nfs

Thanks the reply, I have tried it, but it doesn't work, '-v' can only
use the local address


On Wed, Jul 6, 2022 at 10:39 PM Benjamin Coddington <bcodding@redhat.com> wrote:
>
> On 6 Jul 2022, at 8:28, jie wang wrote:
>
> > Hi, all
> >   When we use NFSv3, we have a LoadBalance in front of NFS server. For
> > example, LoadBalance's ip is ip2 and NFS server's ip is ip1, and
> > client use ip2 to mount.
> >
> >   Now client use flock to lock file, then I restart NFS server and
> > execute sm-notify -f. Then the problem occurs, the sm-notify request's
> > src ip is ip1, not ip2, so rpc.statd will ignore this notify, because
> > it does not match ip2 when mount, so client will not reclaim lock, and
> > lock lost when restart NFS server.
> >
> >   Do you know how to address this ? Thanks a lot.
>
> The sm-notify(8) man page shows you can use '-v' to specify an ipaddr or
> hostname.
>
> Ben
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question abount sm-notify when use NFSv3 lock
       [not found]     ` <CACt_J9NtB5+1MiL8JrNbyLf6uhgHWDYmyAtKgmKdhzMkgL9E5g@mail.gmail.com>
@ 2022-07-07 11:51       ` Benjamin Coddington
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Coddington @ 2022-07-07 11:51 UTC (permalink / raw)
  To: jie wang; +Cc: linux-nfs

On 6 Jul 2022, at 19:57, jie wang wrote:

> If execute "sm-notify -f -v ip2", sm-notify did not send the notify 
> request.

Hmm, maybe its a bug?  You can turn up debugging with the "-d" opt, 
adding
more increases vebosity.  Try using three of them:

sm-notify -ddd -f -v ip2

Have you tried looking at an strace?  Are there different values set for
sm-notify in your nfs.conf file?

Check out the source, perhaps sm-notify isn't going to be able to send a
notification for an address that doesn't exist on a local network 
adapter
(this is a common pattern), and you need to configure that ip address as 
an
additional address on your system?

These are guesses.

Ben


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-07 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 12:28 Question abount sm-notify when use NFSv3 lock jie wang
2022-07-06 14:39 ` Benjamin Coddington
2022-07-06 23:56   ` jie wang
     [not found]     ` <CACt_J9NtB5+1MiL8JrNbyLf6uhgHWDYmyAtKgmKdhzMkgL9E5g@mail.gmail.com>
2022-07-07 11:51       ` Benjamin Coddington

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.