On Sun, Jun 13, 2010 at 04:50:14AM -0000, Alkis Georgopoulos wrote:
> Currently nbd-server and nbd-client communicate using a different port
> for each image. So if e.g. an LTSP admin wants to use a chroot for
> nvidia-based clients and a chroot for the rest of his clients, he'd need
> to use two ports. And he wanted nbd swapping a third port would be
> needed.

Actually, that's not entirely true. NBD has a "virtual host" feature
that allows you to change the served file based on (part of) the IP
address of the client that's connecting. See the "virtstyle" option in
the output of "man 5 nbd-server" for details. You can likewise generate
files on the fly using the prerun and postrun config file options. This
allows you to reduce the number of open ports to--in case you want to
export a filesystem and a swap device--2.

There is also a "prerun" and "postrun" option, which allows you to
generate files on the fly; this could be used to generate a swapfile
with a size based on the type of client (though it would require some
sort of a database of ip address-to-client type mappings)

Having said that,

> This is inconvenient and makes IANA applications to standarize the nbd
> port impossible.

I fully agree with that statement, and have been planning to implement a
similar feature to what you are asking for a while now. I just never got
around to it. Patches are welcome, though -- but then I'd prefer that
the client would be able to specify a name of an export, with the server
using the section name in the config file as the name of the export,
rather than having the ability to specify a path; the latter would have
some security ramifications that I'd prefer not to deal with.

-- 
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

-- 
feature request: add a root-path parameter
https://bugs.launchpad.net/bugs/593227
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to