[ENBD] nbd with an SMP kernel?

Peter T. Breuer ptb@it.uc3m.es
Wed, 18 Oct 2000 08:14:14 +0200 (MET DST)


"A month of sundays ago leonid@hmdc-admin.fas.harvard.edu wrote:"
> On Wed, 18 Oct 2000, Peter T. Breuer wrote:
> > So 4018 is the session port.  The client knows that.  The server used to
> > know that, but it died. 
> 
> That's actually what I thought was going on. 

The point is not that the server doesn't know what the current session
port is, but that the client doesn't know that the server it used to be
talking to on that port is dead (so there isn't any point in waiting for
it).

It can't tell the difference between a dead server (permanent) and a
dead net (temporary). It's a computational science problem. The only
solutions to such things are statd's - things that tell two machines
about each others states. The server must broadcast "I died" when
it comes up after reboot, and all clients must dissolve all their
pending connects. This is how NFS v3 manages to get rid of locks
or open file handles to a newly reborn server. I'm not going to
implement that! I'll go with a long timeout instead.


> > OK ..  I'm convinced.  You have to SIGHUP the
> > client manager. 
> 
> Hmm, in my case sending nbd-client SIGHUP doesn't seem to make it
> reconnect; it just keeps trying to connect to the session port opened by

I was going from memory. It may well be that HUP just causes a
reconnect attempt on the existing port, rather than start a new
connect. I can change it. Or use SIGPWR for that.

> Well, killing nbd-client and restarting it works just fine; it starts a

> I guess the heartbeat package you recommend below is just what I
> need; I'll check it out. (I've never heard about it before). 


Peter