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

Re: Standard NBD URL syntax (again)



On Wed, May 22, 2019 at 10:55:45AM +0100, Richard W.M. Jones wrote:
> So last night I had an important thought about this:
> 
>  * What existing export names are people using in real life?

Good point.

> nbdkit doesn't use export names for anything - you can pass
> anything you like.
> 
> qemu-nbd has an odd system where the export name must match what was
> specified on the command line, but AFAIK it doesn't care about it
> otherwise.
> 
> qemu's internal NBD server may permit multiple export names, but I'm
> not totally sure about that.  What do they look like?  Arbitrary
> strings?  Absolute paths?  Relative paths?
> 
> nbd-server supports multiple export names, and it does appear to want
> absolute paths.

You're confusing two things here.

In nbd-server, the section name is used as the export name; and the
configuration line that starts with 'export=' is used as the path of the
file or device that is exported, but not as the export name.

i.e., in a configuration like this:

[mydevice]
export=/home/wouter/device

the exportname is "mydevice", not "/home/wouter/device".

Beyond that, nbd-server does support all characters as the exportname
that GKeyFile would support in a section name, and e.g., the LTSP people
use something that looks like a path as an export name:

[/opt/ltsp/i386]
exportname = /opt/ltsp/i386.img

With the benefit of hindsight, I've often thought that it was a mistake
to call the device to be served "export=" in the configuration, but now
it's probably way too late to change that anymore.

> Can it use arbitrary strings too, or are absolute paths the only
> option?  How about relative paths?
> 
> Basically, I think what we most commonly use export names for should
> influence how we decide to use them in URLs.

That certainly does make sense.

-- 
To the thief who stole my anti-depressants: I hope you're happy

  -- seen somewhere on the Internet on a photo of a billboard


Reply to: