[ENBD] ENBD with 2.4.2-kernel
Peter T. Breuer
ptb@it.uc3m.es
Thu, 15 Mar 2001 18:26:14 +0100 (MET)
"A month of sundays ago Adrian Turcu wrote:"
> > > Interesting. Let me know of problems. If you write up the
> > > configuration, please let me have a pointer.
> Well, I have some interesting results about my new config :-)
> In a word it's working, but...
>
> If the client is started before the ENBD server starts,
> well... my client will never connect to the server which says me in logs :
>
> nbd-server: Read returned 0 after select predicted read!
Yes, i know. there have been several complaints. In my current code
I've limited the message to one and sent the loop round again with a
delay.
I need to test it more however.
> and after a while from one server started I can saw a lot (10-12) started
> which will cause the machine to hang-up finally.
>
> I have a silly question: What I've missed ?
>
> The server (node2) is started this way:
>
> nbd-server 4017 /dev/sdb
Needs a signature, I think.
> and the client (node1):
>
> insmod -f $PATH_TO_NBD_DRIVER/nbd.o rahead=20 merge_requests=0 sync_intvl=10
> nbd-client node2 4017 node2 -b 1024 -t 5 /dev/nda
Looks OK, though I have lately been using the syntax node2:4017 .
> If I'll wait those 15 secs before starting the client (the time need for server start-up)
> everything will goes fine.
>
> The partition /dev/sdb is 3240376320 Bytes in size (~3GBy)
> Is it to huge for ENBD ? (Another silly question...)
I think not. I have been exporting a 4GB partition
(an LVM one) on 2.4.0 without noticable problems.
Well, until you get hold of my code with the corrected startup loop in
the C code itself, I think I'd do it with a shell script ... launch a
process that starts the client only when it gets the go ahead from the
server, and loop in a while loop until then. Can you think of a
reliable way? I can think of several, but I don't know which is easiest
or best for you ....
1) client mounts node2:/var/run/subsys/nbd/ by nfs, and stops blocking
the client launch when a file nbd-server.pid appears there
2) client has an inetd entry for some port that launches nbd-client
when it gets a ping theer. Limit access to that port to the server.
Get the server to briefly telnet to that port when it has finished
launching nbd-server.
3) etc.
Peter