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

Re: [Nbd] [PATCH] nbd: improve request timeouts handling (rebased)



On Thu, Jul 11, 2013 at 03:23:46PM +0200, Goswin von Brederlow wrote:
> On Wed, Jul 10, 2013 at 09:40:42PM +0200, Michal Belczyk wrote:
> > [rebased against the master, no other changes]
> > 
> > The main idea behind it is to be able to quickly detect broken replica
> > and switch over to another when used with any sort of mirror type device
> > built on top of any number of nbd devices.
> 
> It is good to see someone checking and fixing timeout issues.
> 
> But I would also like to have the opposite behaviour and delay
> detecting failures. Insane? read on...
> 
> 
> I have a small server that runs 24/7 with minimal power consumption. I
> also have a storage node that exports a number of disks via NBD. This
> should be powered down when not in use. The problem is that "not in
> use" is incompatible with NBD as is. The storage node must be running
> and must have an active connection to the server.
> 
> What I'm suggesting is that the nbd-client should be able to create a
> network block device in disconnected state (without attached socket)
> and the kernel would return on the next access. The nbd client can
> then actually connect to the NBD server and restart the device with a
> socket to fullfill the request. In my case that would involve a
> wake-on-lan call to first bring up the storage node.
> 
> Secondly it would be nice to have an idle timeout in the kernel. If no
> access happened to the NBD for some time the kernel should return so
> the client can switch to disconnected mode. In my case that would
> involve sending the storage node to sleep.
> 
> Interested in trying to implement this?

I'm currently busy trying to push bnbd to its first release which is not
easy being distracted by fixing bugs in other but related components on
my way...
So far the biggest winners of my project are the nbd driver and the
nbd client which already have some of the bugfixes upstreamed ;-)

I just wonder -- have you tried with autofs plus some scripting over it
on mount and unmount upon timeout?  I think I have used it once in my
life long ago, so not sure if it would work at all, but it seems possible?

-- 
Michal Belczyk Sr.



Reply to: