Re: [Nbd] [PATCH] nbd: improve request timeouts handling (rebased)
- To: Michal Belczyk <belczyk@...1274...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH] nbd: improve request timeouts handling (rebased)
- From: Goswin von Brederlow <goswin-v-b@...186...>
- Date: Mon, 15 Jul 2013 10:38:35 +0200
- Message-id: <20130715083835.GA30816@...1266...>
- In-reply-to: <20130713200120.GE97846@...1273...>
- References: <20130710194042.GA97763@...1273...> <20130711132346.GB26521@...1266...> <20130713200120.GE97846@...1273...>
On Sat, Jul 13, 2013 at 10:01:20PM +0200, Michal Belczyk wrote:
> 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.
I don't think autofs can umount a filesystem with open files, like a
shell having their CWD in the FS. Right? The FS would then easily be
blocked accidentally without being actually in real use.
MfG
Goswin
Reply to: