[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] nbd-client: timeout option not working



Hi all, I'm testing nbd.
I have a computer with debian squeeze (kernel 2.6.32) and another
computer with kubuntu 11.04 (kernel 2.6.38). (pc1)
They run nbd-server (2.9.16). They are exporting a raw file of 1G. (pc2)

On a laptop I'm running debian squeeze and nbd-client. (pc3)
I conncet nbd0 to pc1 and nbd1 to pc2.
On my laptop I run a virtual machine (kvm) that uses nbd0 and nbd1 as
its devices.
The virtual machin has a third device that is just a another debian
sqeeze that is using the two other device to create a raid1 (md0).

Well, if I disconnect nbd0 on the host nbd-client -d, on the guest the
disk get signe as failed the first time you try to write something.
And that is good!

If I unplug the ehternet cable from pc1, the guest is like frozen, the
kvm process goes 100% cpu, and the nbd device never fail.
Only disconneting manualy the device on the host, drive back to normal
situation: disk in failure, kvm process using normal amount of cpu.

Off course I tryed to add timeout=3 to nbd-client on the host
but...nothing change: the device nbd0 and the relative nbd-client
processes stay there till ever (or almost), sure not 3 seconds.

On the host
nbd-client  timeout=20 192.168.5.2 2000 /dev/nbd1
WARNING: old-style command-line argument encountered. This is deprecated.
Negotiation: ..size = 1048576KB
bs=1024, sz=1048576

Why do I get a warning?
Why timeout is not working with recent kernels?
Note: I also tryed to compile the latest nbd version on pc1...nothing changed.

You can test this just with a simple and single nbd exported device.
Try fdisk -l /dev/nbd0 before unplugging the cable.
Try the same after you unplug the cable and wait the timeout.
Replug the cable, fdik will work again!!!!



Reply to: