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

[Nbd] nbd-proxy



Hi Stéphane,

Vagrant told me you were working on a proxy to sit between nbd-client
and nbd-server, with the intent of improving reliability of nbd. Sorry
to be an ass, but I think that's a bad idea.

I understand why you want to do this; nbd-client has a -persist option,
that will try to reconnect the client once the connection dies. But when
this happens right in the middle of a bunch of writes, there will always
be a few writes that are lost due to the fact that the connection is not
back instantly. If something holds back the writes until either the
connection is back, or we are satisfied that the server is well and
truly gone and will not come back, then that will certainly improve
reliability. The whole point of nbd-client's -persist option was that
the kernel would hold off those writes as long as there is a process
running that has the client block device open; I discussed this with
Paul, but AFAIK that part was never implemented.

To do this by way of an extra process that sits between the client and
the server is not going to help; on the contrary. A second process that
is important for the block device is a second process that might be
swapped out and deadlock the system. There are patches in the make to
increase the reliability wrt the swapout deadlock, but they would only
work for the process that's setting up the nbd block device (i.e.,
nbd-client itself); not for anything in between.

You could in theory run nbd-proxy on a different machine, in which case
it would not suffer from those deadlock issues, but then I fail to see
the point -- if the proxy is running on a different machine, then the
connection can get lost as well as if it isn't running at all.

I think your time would be better spent working with Paul on those
block-the-device-until-nbd-client-is-gone-or-reconnects patches.

Regards,

-- 
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html

Attachment: signature.asc
Description: Digital signature


Reply to: