[ENBD] Re: 20G dd hang up!

Takahiro WATANABE enbd@lists.community.tummy.com
Mon, 07 Jan 2002 23:40:53 +0900


Hi,

: "A month of sundays ago Kuniyasu SUZAKI wrote:"
: > And I could read full volume from client from server and it was succeeded.
: >     dd if=/dev/nda of=/dev/null bs=1048576 count=19539
: > 
: > The option of nbd-server and nbd-client is as follows.
: >   On server machine:
: >     nbd-server 5058 /dev/sda1  -t 120 -b 4096  -0
: >   On client machine:
: >     nbd-client london:5058  -n 8 -b 4096  -t 120  -p 1  -d 1 /dev/nda
: 
: Try with -b 1024. Some people seem to have problems with 4096
: blksize. I have no idea why (it cannot _in principle_ be internal to
: enbd).
: 
: > Can I fix the "dd" write problem to tune time out option (-t) or something?
: > Please give me suggestion or idea to fix the problem.
: 
: Well, there are things you can do here to turn the problem into one
: that is more easily analized, but see first if it goes away with 1K
: blocksize.
: 
: BTW, you should be using  enbd 1.4.16 or 2.4.17pre (not 2.4.6). Also
: try that (first ;-).


I have tried to use nbd-2.4.17.tgz and change the block size,
then tested the dd command again.

# dd if=/dev/zero of=/dev/nda bs=1048576 count=19539

Then I have got the following messages constantly:

-------- messages ----------
nbd-client-netserver: write exits OK
nbd-client-netserver: write enters for sector 38904 len 1024
nbd-client-netserver: net_send_req enters with req type 1 handle 0x4bfc len 1024 off 19918848
nbd-client-netserver: net_send_req 8050a08 writes to stream 805a524 from req bffff348 len 76
nbd-client-netserver: net_send_req returns 76 from write_str 805a524 from req bffff348 len 76
nbd-client-netserver: net_send_req writes to stream 805a524 from buf 805e1fc len 1024
nbd-client-netserver: net_send_req returns 1024 from write_str 805a524 from buf 805e1fc len 1024
nbd-client-netserver: net_send_request returns 1024 on req type 1 with handle 0x4bfc
-------- messages ----------

Finally, the machine itself hanged up.


What I have done is:

# tar zxf (somewhere)/nbd-2.4.17.tgz
# cd nbd-2.4.17

Then I edited the Makefile. 
Changed points are:

# diff Makefile.orig Makefile
44c44
< SERVER       = localhost
---
> SERVER       = machineA
46c46
< CLIENT       = localhost
---
> CLIENT       = machineB.

# make config
# make
# make test (this didn't succeed.)
# make install

Then I had the server(machineA) 
and client(machineB) started as follows:

machineA# nbd-server 5058 /dev/sda1  -t 120 -b 1024  -0.

machineB# rmmod nbd
machineB# insmod nbd.o rahead=20 merge_requests=0 sync_intvl=0
machineB# nbd-client machineA 5058 machineA  -b 1024 -t 120  -jb /tmp/nbd.log -p 5 -d 1 /dev/nda.



Regards,


Takahiro WATANABE
AIST.
tkhr.watanabe@aist.go.jp