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

Re: Standard NBD URL syntax (again)



On Wed, May 22, 2019 at 12:55 PM Richard W.M. Jones <rjones@redhat.com> wrote:
So last night I had an important thought about this:

 * What existing export names are people using in real life?

nbdkit doesn't use export names for anything - you can pass
anything you like.

Since you server single image you don't care about export name, but it is strange that
the value is ignored.

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-nbd fails if the export name does not match the value of --export-name
argument.

$ qemu-nbd -t -r --export-name=bar -k /tmp/nbd.sock file
$ qemu-img info nbd:unix:/tmp/nbd.sock:exportname=foo
qemu-img: Could not open 'nbd:unix:/tmp/nbd.sock:exportname=foo': Requested export not available
server reported: export 'foo' not present

If qemu-nbd will have a capability to expose all bitmaps in an image, specifying a bitmap
name as the export name can be useful to get data from certain point instead of data for
the entire image.

We always use empty export name when exposing disks via NBD with qemu-nbd.

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?

They are name of a temporary bitmap created by libvirt when exposing a disk for 
backup. I think currently this is the name of the disk e.g. "vda".

Accessing the export "vda" let you access the contents of the disk "vda" at the time
the backup was started.

Since the export never refeThis must be a fully-qualified path and filename; relative paths are not allowed.  r to a file, there is no reason to use / in the name.

nbd-server supports multiple export names, and it does appear to want
absolute paths.  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.

According to ndb-server(5):

    This must be a fully-qualified path and filename; relative paths are not allowed.

Nir

Reply to: