Displaying 20 results from an estimated 31 matches for "nbd2".
Did you mean:
nb2
2020 Aug 19
0
[libnbd PATCH 2/2] info: Use nbd_opt_info for fewer handles during --list
...const char *uri)
{
@@ -468,31 +466,41 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri)
printf ("\t\"exports\": []\n");
for (i = 0; i < export_list.len; ++i) {
- const char *name;
+ const char *name = export_list.names[i];
struct nbd_handle *nbd2;
- /* Connect to the original URI, but using opt mode to alter the export. */
- name = export_list.names[i];
- nbd2 = nbd_create ();
- if (nbd2 == NULL) {
- fprintf (stderr, "%s\n", nbd_get_error ());
- exit (EXIT_FAILURE);
- }
- nbd_set_uri_allow_local_file (...
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
...(nbd1);
if (count == -1) {
@@ -434,49 +432,38 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri)
printf ("\t\"exports\": []\n");
for (i = 0; i < count; ++i) {
- char *name, *desc, *new_path, *new_uri;
+ char *name, *desc;
struct nbd_handle *nbd2;
name = nbd_get_list_export_name (nbd1, i);
- if (name) {
- /* We have to modify the original URI to change the export name.
- * In the URI spec, paths always start with '/' (which is ignored).
- */
- xmluri = xmlParseURI (uri);
- if (!xmluri) {
-...
2015 Jan 08
2
Re: Using virsh blockcopy -- what's it supposed to accomplish?
...hoping to use the NBD interface to accomplish
> that. So I tried this (a variant of the above), working on the same
> system because it's easier:
>
> qemu-img create -f qcow2 /tmp/dsk.test.qcow2
> qemu-nbd -f qcow2 -p11112 /tmp/dsk.test.qcow2
> nbd-client localhost 11112 /dev/nbd2
> virsh dumpxml my_domain > my_domain.xml
> virsh undefine my_domain
> virsh blockcopy --domain my_domain --wait --verbose --finish
Missing a destination? I'm guessing you meant /dev/nbd2 as the
pre-existing destination?
> virsh define my_domain.xml
> nbd-client -d /dev/nbd...
2020 Oct 02
0
[libnbd PATCH v2 2/2] info: List available meta-contexts
...*next = contexts->next;
+ free (contexts->name);
+ free (contexts);
+ contexts = next;
+ }
free (content);
free (export_name);
free (export_desc);
@@ -534,17 +597,16 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri)
}
nbd_set_uri_allow_local_file (nbd2, true); /* Allow ?tls-psk-file. */
nbd_set_opt_mode (nbd2, true);
+ nbd_set_full_info (nbd2, true);
if (nbd_connect_uri (nbd2, uri) == -1 ||
- nbd_set_export_name (nbd2, name) == -1 ||
- nbd_opt_go (nbd2) == -1) {
+ nbd_set_export_name (nbd2, name) ==...
2013 Apr 08
1
How to device port on the controller
Hi,
I am adding a disk to my KVM virtual server, but for some reason it refuses
to honor the <address>
I have tried the following 3:
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/nbd2'/>
<target dev='vdb' bus='virtio'/>
<serial>my-fake-serial</serial>
<address type='drive' controller='0' bus='1' target='3' unit='2'/>
</disk>
<disk type='block' devic...
2014 Dec 22
7
Using virsh blockcopy -- what's it supposed to accomplish?
I am experimenting with the blockcopy command, and after figuring out
how to integrate qemu-nbd, nbd-client and
dumpxml/undefine/blockcopy/define/et. al. I have one remaining question:
What's the point?
The "replication" disk file is not, from what I can ascertain, bootable.
I expect this operation to create a pristine copy of my source qcow2
file (at a given point in time)
2015 Jan 08
0
Re: Using virsh blockcopy -- what's it supposed to accomplish?
...to be off-system, and was hoping to use the NBD interface to accomplish
that. So I tried this (a variant of the above), working on the same
system because it's easier:
qemu-img create -f qcow2 /tmp/dsk.test.qcow2
qemu-nbd -f qcow2 -p11112 /tmp/dsk.test.qcow2
nbd-client localhost 11112 /dev/nbd2
virsh dumpxml my_domain > my_domain.xml
virsh undefine my_domain
virsh blockcopy --domain my_domain --wait --verbose --finish
virsh define my_domain.xml
nbd-client -d /dev/nbd2
and the qemu-nbd process exits, as I wish. I presume at this point that
the new file has integrity.
I can take the q...
2015 Jan 08
2
Re: Using virsh blockcopy -- what's it supposed to accomplish?
...p/dsk.test.qcow2 1G
For the rest, I'm afraid I still didn't manage time to test
the NBD scenario to give a meaningful response here. I'll let the others
who deal with NBD more often respond to it.
> qemu-nbd -f qcow2 -p11112 /tmp/dsk.test.qcow2
> nbd-client localhost 11112 /dev/nbd2
> virsh dumpxml my_domain > my_domain.xml
> virsh undefine my_domain
> virsh blockcopy --domain my_domain --wait --verbose --finish
> virsh define my_domain.xml
> nbd-client -d /dev/nbd2
>
> and the qemu-nbd process exits, as I wish. I presume at this point that the
> ne...
2020 Jul 29
0
[libnbd PATCH 2/2] info: Expose description in list mode
...json_string (content);
@@ -402,7 +411,7 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri)
xmlURIPtr xmluri = NULL;
for (i = 0; i < nbd_get_nr_list_exports (nbd1); ++i) {
- char *name, *new_path, *new_uri;
+ char *name, *desc, *new_path, *new_uri;
struct nbd_handle *nbd2;
name = nbd_get_list_export_name (nbd1, i);
@@ -437,10 +446,12 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri)
}
/* List the metadata of this export. */
- list_one_export (nbd2);
+ desc = nbd_get_list_export_description (nbd1, i);
+ list_one_export...
2020 Aug 19
3
[libnbd PATCH 0/2] NBD_OPT_INFO support
This replaces 13/13 of my v2 series; and now that it has pretty good
testsuite coverage and demonstrable performance improvement to
nbdinfo, I'm going ahead and pushing this now. We may still want to
add further nbd_opt_* commands for other fine-grained tuning of
negotiation, but for now, I think things have stabilized on this end,
and I can return to polishing .list_exports on the nbdkit
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...ting to hello ...
+ * /tmp/sock: hello: size = 2048 bytes
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <errno.h>
+
+#include <libnbd.h>
+
+int
+main (int argc, char *argv[])
+{
+ struct nbd_handle *nbd, *nbd2;
+ int r, i;
+ char *name;
+ int64_t size;
+
+ if (argc != 2) {
+ fprintf (stderr, "%s socket\n", argv[0]);
+ exit (EXIT_FAILURE);
+ }
+
+ /* Create the libnbd handle for querying exports. */
+ nbd = nbd_create ();
+ if (nbd == NULL) {
+ fprintf (stderr, "%s\n",...
2020 Jul 20
2
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
Proposal for new APIs to list exports. The general shape of the API
can probably best be seen from the examples/list-exports.c example.
Rich.
2019 Sep 17
2
[PATCH libnbd] docs: Document limits on export name.
...ts on export name, encoding, etc.
---
generator/generator | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/generator/generator b/generator/generator
index a72f36c..87a8cdf 100755
--- a/generator/generator
+++ b/generator/generator
@@ -1066,10 +1066,16 @@ C<\"nbd2\">, etc.";
longdesc = "\
For servers which require an export name or can serve different
content on different exports, set the C<export_name> to
-connect to. This is only relevant for the newstyle protocol.
+connect to. The default is the empty string C<\"\&...
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think
it's worth experimenting with revisiting how our API for list mode
should actually work [1] (so that we can reuse a single connection for
both grabbing the list and finally using NBD_OPT_GO), but this change
was easier to whip together while still thinking about that.
[1]
2013 Apr 09
1
Faulty manual?
Hi,
Look under examples:
http://builder.virt-tools.org/artifacts/libvirt-virshcmdref/html/sect-attach-disk.html
(root at h2)-(/)# virsh attach-disk vps_99 /dev/nbd2 vdb --address
pci:0000.00.11.0 --persistent
*error: command 'attach-disk' doesn't support option --address*
(root at h2)-(/)# virsh --version
0.7.5
Is someone playing a trick on me?
Regards,
Daniele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <h...
2020 Aug 03
5
[libnbd PATCH 0/4] More nbdinfo fixes
This rounds up the remaining bugs that I originally identified in:
https://www.redhat.com/archives/libguestfs/2020-July/msg00153.html
Eric Blake (4):
api: Permit export list APIs when Connected
info: Support --list with serializing servers
info: Fix --json output when list size != 1
info: Permit --size --json
generator/API.ml | 6 +++---
info/info-list-json.sh | 9 +++++++++
2020 Oct 02
4
[libnbd PATCH v2 0/2] opt_list_meta_context
In v2: ack'ed preliminary patches have been pushed, and I've added a
lot of testsuite coverage as well as putting the new API to use in
nbdinfo.
Eric Blake (2):
api: Add nbd_opt_list_meta_context
info: List available meta-contexts
lib/internal.h | 1 +
generator/API.ml | 84 ++++++++-
2020 Aug 11
3
[libnbd PATCH] API: Add nbd_set_opt_mode to expose NEGOTIATING state
...ate);
diff --git a/generator/API.ml b/generator/API.ml
index 82fdf75..ff7f4c1 100644
--- a/generator/API.ml
+++ b/generator/API.ml
@@ -90,6 +90,7 @@ and flags = {
and permitted_state =
| Created
| Connecting
+| Negotiating
| Connected
| Closed | Dead
and link =
@@ -268,7 +269,7 @@ C<\"nbd2\">, etc.";
"set_export_name", {
default_call with
args = [ String "export_name" ]; ret = RErr;
- permitted_states = [ Created ];
+ permitted_states = [ Created; Negotiating ];
shortdesc = "set the export name";
longdesc = "...
2020 Aug 14
18
[libnbd PATCH v2 00/13] Adding nbd_set_opt_mode to improve nbdinfo
Well, I'm not quite done (I still want to get nbdinfo to work on a
single nbd connection for all cases when reading the heads of the
file is not required), but I'm happy with patches 1-11, and 12-13
show where I'm headed for getting NBD_OPT_INFO to work. Posting
now to see if some of the earlier patches are ready to commit while
I continue working on the latter half.
Eric Blake (13):
2020 Aug 14
0
[libnbd PATCH v2 11/13] api: Add nbd_aio_opt_list
...(count == 0 && json_output)
+ if (export_list.len == 0 && json_output)
printf ("\t\"exports\": []\n");
- for (i = 0; i < count; ++i) {
- char *name, *desc;
+ for (i = 0; i < export_list.len; ++i) {
+ const char *name;
struct nbd_handle *nbd2;
- name = nbd_get_list_export_name (nbd1, i);
- if (!name) {
- fprintf (stderr, "unable to obtain export name: %s\n",
- nbd_get_error ());
- exit (EXIT_FAILURE);
- }
-
/* Connect to the original URI, but using opt mode to alter the export. */
+ na...