[Ocfs2-tools-devel] [PATCH] add support for xvd devices

Wim Coekaerts wim.coekaerts at oracle.com
Thu Jan 3 14:19:48 PST 2013


It is common for virtual disks to be used with ocfs2 inside a VM. With Xen, these devices are /dev/xvd. This patch allows for xvd devices to be used when using global-heartbeat.


---
 o2cb_ctl/o2cb_scandisk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/o2cb_ctl/o2cb_scandisk.c b/o2cb_ctl/o2cb_scandisk.c
index 92e754e..6cd3635 100644
--- a/o2cb_ctl/o2cb_scandisk.c
+++ b/o2cb_ctl/o2cb_scandisk.c
@@ -128,6 +128,8 @@ static void add_to_list(struct list_head *device_list, struct devnode *node)
 			add = !strncmp(path->path, "/dev/sd", 7);
 			if (!add)
 				add = !strncmp(path->path, "/dev/loop", 9);
+			if (!add)
+				add = !strncmp(path->path, "/dev/xvd", 8);
 		}
 		if (add) {
 			hb = malloc(sizeof(struct hb_devices));
-- 
1.5.6.5




More information about the Ocfs2-tools-devel mailing list