From patchwork Wed Oct 24 11:47:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharata B Rao X-Patchwork-Id: 193757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5799D2C0123 for ; Wed, 24 Oct 2012 22:47:04 +1100 (EST) Received: from localhost ([::1]:34134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQzQM-0002al-Is for incoming@patchwork.ozlabs.org; Wed, 24 Oct 2012 07:47:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQzQA-0002aa-G7 for qemu-devel@nongnu.org; Wed, 24 Oct 2012 07:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQzQ5-0006Rp-DO for qemu-devel@nongnu.org; Wed, 24 Oct 2012 07:46:50 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:59442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQzQ4-0006Qh-S9 for qemu-devel@nongnu.org; Wed, 24 Oct 2012 07:46:45 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 24 Oct 2012 21:44:32 +1000 Received: from d23relay03.au.ibm.com (202.81.31.245) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 24 Oct 2012 21:44:30 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9OBkUtF50397266 for ; Wed, 24 Oct 2012 22:46:34 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9OBkUlv027120 for ; Wed, 24 Oct 2012 22:46:30 +1100 Received: from in.ibm.com ([9.77.197.87]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9OBkN1l026978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 24 Oct 2012 22:46:27 +1100 Date: Wed, 24 Oct 2012 17:17:53 +0530 From: Bharata B Rao To: qemu-devel@nongnu.org Message-ID: <20121024114753.GG16487@in.ibm.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) x-cbid: 12102411-7014-0000-0000-000002126EC1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.81.31.148 Cc: Kevin Wolf , Paolo Bonzini , Anthony Liguori Subject: [Qemu-devel] [PATCH v1] qemu: Document GlusterFS block driver usage X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qemu: Document GlusterFS block driver usage From: Bharata B Rao Signed-off-by: Bharata B Rao --- qemu-doc.texi | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ qemu-options.hx | 17 +++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index 35cabbc..a381512 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -421,6 +421,7 @@ snapshots. * disk_images_nbd:: NBD access * disk_images_sheepdog:: Sheepdog disk images * disk_images_iscsi:: iSCSI LUNs +* disk_images_gluster:: GlusterFS disk images @end menu @node disk_images_quickstart @@ -805,7 +806,55 @@ qemu-system-i386 -iscsi initiator-name=iqn.qemu.test:my-initiator \ -cdrom iscsi://127.0.0.1/iqn.qemu.test/2 @end example +@node disk_images_gluster +@subsection GlusterFS disk images +GlusterFS is an user space distributed file system. + +You can boot from the GlusterFS disk image with the command: +@example +qemu-system-x86_64 -drive file=gluster[+@var{transport}]://[@var{server}[:@var{port}]]/@var{volname}/@var{image}[?socket=...] +@end example + +@var{gluster} is the protocol. + +@var{transport} specifies the transport type used to connect to gluster +management daemon (glusterd). Valid transport types are +tcp, unix and rdma. If a transport type isn't specified, then tcp +type is assumed. + +@var{server} specifies the server where the volume file specification for +the given volume resides. This can be either hostname, ipv4 address +or ipv6 address. ipv6 address needs to be within square brackets [ ]. +If transport type is unix, then @var{server} field should not be specifed. +Instead @var{socket} field needs to be populated with the path to unix domain +socket. + +@var{port} is the port number on which glusterd is listening. This is optional +and if not specified, QEMU will send 0 which will make gluster to use the +default port. If the transport type is unix, then @var{port} should not be +specified. + +@var{volname} is the name of the gluster volume which contains the disk image. + +@var{image} is the path to the actual disk image that resides on gluster volume. + +You can create a GlusterFS disk image with the command: +@example +qemu-img create gluster://@var{server}/@var{volname}/@var{image} @var{size} +@end example + +Examples +@example +qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img +qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4/testvol/a.img +qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img +qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img +qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img +qemu-system-x86_64 -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img +qemu-system-x86_64 -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket +qemu-system-x86_64 -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img +@end example @node pcsys_network @section Network emulation diff --git a/qemu-options.hx b/qemu-options.hx index 46f0539..d57fb91 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2018,6 +2018,23 @@ qemu-system-i386 --drive file=sheepdog:192.0.2.1:30000:MyVirtualMachine See also @url{http://http://www.osrg.net/sheepdog/}. +@item GlusterFS +GlusterFS is an user space distributed file system. +QEMU supports the use of GlusterFS volumes for hosting VM disk images using +TCP, Unix Domain Sockets and RDMA transport protocols. + +Syntax for specifying a VM disk image on GlusterFS volume is +@example +gluster[+transport]://[server[:port]]/volname/image[?socket=...] +@end example + + +Example +@example +qemu-system-x86_84 --drive file=gluster://192.0.2.1/testvol/a.img +@end example + +See also @url{http://www.gluster.org}. @end table ETEXI