On Thu, Jul 21, 2011 at 11:48:15AM -0400, Paul Clements wrote: > On Thu, Jul 21, 2011 at 11:30 AM, Wouter Verhelst <[email protected]> wrote: > > On Thu, Jul 21, 2011 at 04:12:43PM +0200, Valerio Pachera wrote: > >> 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? > > > > Because you used the syntax "timeout=20" rather than "-timeout 20". The > > former is a positional argument, the latter isn't. The '-timeout' > > syntax is also easier to parse. The 'timeout=' may eventually be > > removed, but for now it should give you the same result. > > > >> Why timeout is not working with recent kernels? > > > > I'm not sure, to be honest. If you specify a timeout, nbd-client runs > > > > ioctl(nbd, NBD_SET_TIMEOUT, timeout) > > > > which is supposed to communicate a timeout to the kernel. Beyond that, > > it happens at the other end of the syscall... Paul, any idea? > > Yes, that is in there to stop nbd IO from hanging indefinitely in case > the network/server goes down. Instead of waiting for a TCP timeout, > the NBD timeout errors out the hung IO and then shuts the socket down. > Primarily useful for cases where you have redundancy (say raid1) over > the nbd and you can handle the nbd device going away.
Yes, and it looks like this is exactly what Valerio is trying to do, and that it is not working for him. > In many cases you are better off just letting the IO hang and hoping > that the network/server comes back. I agree, but this is one of those rare cases where it would make sense :-) -- The volume of a pizza of thickness a and radius z can be described by the following formula: pi zz a ------------------------------------------------------------------------------ 5 Ways to Improve & Secure Unified Communications Unified Communications promises greater efficiencies for business. UC can improve internal communications as well as offer faster, more efficient ways to interact with customers and streamline customer service. Learn more! http://www.accelacomm.com/jaw/sfnl/114/51426253/ _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
