|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] drbd: and hvm
>
> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|