From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Javier Guerra <javier@guerrag.com>
Cc: carlopmart <carlopmart@gmail.com>, kvm@vger.kernel.org
Subject: Re: Sharing disks between two kvm guests
Date: Fri, 20 Jun 2008 18:32:11 +0200 [thread overview]
Message-ID: <1213979531.15996.28.camel@frecb07144> (raw)
In-Reply-To: <90eb1dc70806200707k4e08c4d7s41708fc9f84c2a3c@mail.gmail.com>
Le vendredi 20 juin 2008 à 09:07 -0500, Javier Guerra a écrit :
> On Fri, Jun 20, 2008 at 7:23 AM, carlopmart <carlopmart@gmail.com> wrote:
> > Felix Leimbach wrote:
> >>
> >>> This is my first post to this list. I have already installed kvm-70
> >>> under rhel5.2. My intention is to share on disk image betwwen two rhel5.2
> >>> kvm guests. Is it possible to accomplish this in kvm like xen or vmware
> >>> does?? How can I do?? I didn't find any reference abou this on kvm
> >>> documentation ...
>
> i tried this looong ago and didn't really work because there was some
> userspace cache on each QEMU instance. but the -drive option has a
> 'cache=off' setting that should be enough.
>
> in theory (i haven't tested, but Avi 'blessed' it):
> - create a new image with qemu-img
> - add it to the command line using -drive file=xxx,cache=off on both
> KVM instances
> - use a cluster filesystem!
RFC:
Well, well, perhaps it is delusions of a sick mind but since the
introduction of qemu-nbd I think we can develop easily something to
share a disk between several virtual hosts:
I- in a first step, we can modify qemu-nbd to accept several connections
for one disk image, for instance:
# qemu-nbd my-disk.qcow2
# nbd-client localhost 1024 /dev/nbd0
# nbd-client localhost 1024 /dev/nbd1
and start two virtual hosts:
"qemu -hda v1.img -hdb /dev/nbd0" and "qemu -hda v2.img -hdb /dev/nbd1"
Of course the filesystem must know how to share the access to the disk
with others (-> "cluster filesystem")
II- in a second step, we can include directly the nbd protocol in qemu
(block-nbd.c, "-drive file=nbd:localhost:1024") to connect to the
server. We can also add some commands to the protocol to manage lock,
HA, "what else ?" (Hi George).
Any comments ?
Cheers,
Laurent
--
------------- Laurent.Vivier@bull.net --------------
"In short: just say NO TO DRUGS and maybe you won't
end up like the Hurd people." -- Linus Torvald
next prev parent reply other threads:[~2008-06-20 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 8:57 Sharing disks between two kvm guests carlopmart
2008-06-20 11:04 ` Felix Leimbach
2008-06-20 12:23 ` carlopmart
2008-06-20 14:07 ` Javier Guerra
2008-06-20 16:32 ` Laurent Vivier [this message]
2008-06-20 16:37 ` Anthony Liguori
2008-06-20 18:54 ` Laurent Vivier
2008-06-20 19:30 ` Anthony Liguori
2008-06-20 18:28 ` Avi Kivity
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=1213979531.15996.28.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--cc=carlopmart@gmail.com \
--cc=javier@guerrag.com \
--cc=kvm@vger.kernel.org \
/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