This patch adds detailed plans to support Gluster in XEN, QEMU/KVM
and such VM, in a way that is similar to sharedfile disk template.

Signed-off-by: Weiwei Jia <[email protected]>
---
 doc/design-glusterfs-ganeti-support.rst |   37 ++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/doc/design-glusterfs-ganeti-support.rst 
b/doc/design-glusterfs-ganeti-support.rst
index a26074e..896c981 100644
--- a/doc/design-glusterfs-ganeti-support.rst
+++ b/doc/design-glusterfs-ganeti-support.rst
@@ -74,7 +74,7 @@ Now, there are two specific enhancements:
   works with VM images on Gluster volumes.
 
 Proposed implementation
------------------------
+=======================
 
 QEMU/KVM includes support for GlusterFS and Ganeti could support GlusterFS
 through QEMU/KVM. However, this way could just let VMs of QEMU/KVM use 
GlusterFS
@@ -92,6 +92,41 @@ VMs), RBD disk template would be a good reference. The first 
part would be finis
 at first and then the second part would be completed, which is based on the 
first
 part.
 
+Gluster for XEN and QEMU/KVM VM (similar to sharedfile)
+-------------------------------------------------------
+This part adds support for Gluster for XEN VM, QEMU/KVM VM and such, in a way
+which is similar to sharedfile disk template. It would be finished with two
+steps as follows.
+
+- Mount server gluster volume to local directory of each instance in the
+  cluster.
+- Add instance with the disk installed under the local directory that is
+  based on gluster backend storage.
+
+The second step is easy to realize because sharedfile disk template is a good
+reference (see commit 4b97f9024376b7bd5db9fce0aba50e29ed842fa2 and
+design-shared-storage.rst for details). The first step would be completed as
+follows.
+
+- Add "--disk-parameters gluster:hostname=node1,volname=ganeti" parameters
+  to ``gnt-instance add`` command.
+- Run "gnt-instance add --disk-parameters hostname=node1,volname=ganeti
+  instance.example.com", that would get the disk parameters, mount Gluster 
volume
+  to local Gluster storage dir, save (hostname, node1), (volname, ganeti) into
+  ganeti config file, and then create instance with Gluster backend storage.
+- VerifyDisks checks if Gluster storage dir is mounted when creating an 
instance.
+- If not mounted, ActivateDisks would mount the Gluster volume to node's 
Gluster
+  storage dir.
+- Check (and if needed mount) the Gluster volume from inside CreateDisk (a 
function
+  called as part of the InstanceCreate opcode)
+
+In order to run above mount command correctly, the '--disk-parameters 
disk-template:
+disk-param=value[, disk-param=value...]' option of ``gnt-instance add`` command
+has to support the format of '--disk-parameters gluster:hostname=node1,volname=
+ganeti'. Through this way, hostname and volume name would be obtained. The 
gluster
+storage dir will also be obtained by adding the parameter 
'--gluster-storage-dir'
+at the instance adding time.
+
 .. vim: set textwidth=72 :
 .. Local Variables:
 .. mode: rst
-- 
1.7.10.4

Reply via email to