xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "James Harper" <james.harper@bendigoit.com.au>
To: xen-devel@lists.xensource.com
Subject: RE: drbd: and hvm
Date: Tue, 6 Apr 2010 17:33:17 +1000	[thread overview]
Message-ID: <AEC6C66638C05B468B556EA548C1A77D019193E6@trantor> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D019193E3@trantor>

> 
> What is it that prevents drbd: devices from not working under HVM?
Could
> the fix just be as simple as mapping 'drbd:name-of-resource' to
> '/dev/drbd/by-res/<name-of-resource>'?
> 

The following patch maps it correctly, but it only works if the device
is already 'primary', which kind of defeats the purpose... qemu-dm must
be trying to open the device before the drbd script switches the local
node to 'primary'. Might it still be a useful addition to qemu-dm
though? (eg it would work in a multiple-primary setup).

James

diff --git a/xenstore.c b/xenstore.c
index 05a1c22..b53f474 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -513,6 +513,14 @@ void xenstore_parse_domain_config(int hvm_domid)
             params = newparams;
            format = &bdrv_raw;
         }
+        /* handle drbd mapping */
+        if (!strcmp(drv, "drbd")) {
+            char *newparams = malloc(17 + strlen(params) + 1);
+            sprintf(newparams, "/dev/drbd/by-res/%s", params);
+            free(params);
+            params = newparams;
+           format = &bdrv_raw;
+        }

 #if 0
        /* Phantom VBDs are disabled because the use of paths

  reply	other threads:[~2010-04-06  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-06  7:12 drbd: and hvm James Harper
2010-04-06  7:33 ` James Harper [this message]
2010-04-29 21:58   ` Sauro Saltini
2010-04-29 23:44     ` James Harper
2010-05-01 12:19       ` Sauro Saltini
2014-01-28  6:23     ` Kamal Kishore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AEC6C66638C05B468B556EA548C1A77D019193E6@trantor \
    --to=james.harper@bendigoit.com.au \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).