qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Fedora/Linux Management Tools <et-mgmt-tools@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [et-mgmt-tools] Image Corruption Possible with qemu and qemu-kvm
Date: Mon, 27 Aug 2007 21:27:48 +0100	[thread overview]
Message-ID: <20070827202748.GK9043@redhat.com> (raw)
In-Reply-To: <OF4980E1C4.B4D3E393-ONC1257344.006E4CB5-C1257344.006F7D77@de.ibm.com>

On Mon, Aug 27, 2007 at 10:19:42PM +0200, Sven Oehme wrote:
> i thought it might be good to post this on qemu-devel as well, as i see 
> this as a general qemu / kvm / xen /whatevercomesnext issue .
>
> are there any plans to implement a default in qemu to prevent accessing 
> the same image multiple times ? 

Each QEMU instance is unware of each other so can't directly check this. One
possiblity would be for QEMU to use fcntl() to take a lock on a disk image
when opening it. With raw disk images at least, it is, however, safe to let
multiple QEMU instances use it at once *provided* you have a clustered
filesystem installed, rather than regular FAT or ext2/3, so one wouldn't want
to exclude this use case.

> i know that in xen they deal with this problem somehow xen specific.
> wouldn't it be good to prevent multiple access to the same image by 
> default and add a switch to overwrite it ? 

In the scenario you mention, libvirt should probably do a sanity check for
this before letting you start the guest. libvirt already supports the idea
of 'shared' disk images where two or more guests can be optionally configured 
to have write access - basically assumes the admin requesting sharing knows
what they're doing.

> i corrupted a couple of virtual Linux images last week as i accidentally 
> started them two times .. 
> i opened a bug against qemu (not sure if this was a good idea) -->  
> https://bugzilla.redhat.com/show_bug.cgi?id=253533 
> 
> are there any plans to ensure that this can't happen in future releases of 
> virt-manager with lock files in the image directory or similar ? 

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

  reply	other threads:[~2007-08-27 20:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46D2EC13.8020005@bppiac.hu>
     [not found] ` <1188232650.25884.100.camel@localhost.localdomain>
     [not found]   ` <OFCAE928CF.4933C4AF-ONC1257344.006B3E8C-C1257344.006BB8A7@de.ibm.com>
2007-08-27 20:19     ` [Qemu-devel] Re: [et-mgmt-tools] Image Corruption Possible with qemu and qemu-kvm Sven Oehme
2007-08-27 20:27       ` Daniel P. Berrange [this message]
2007-08-27 20:37         ` Avi Kivity
2007-08-27 21:02         ` Anthony Liguori
2007-08-27 21:26           ` Daniel Veillard
2007-08-28  2:13           ` Avi Kivity
2007-08-29 12:44             ` Sven Oehme
2007-08-29 14:58           ` Paul Jakma
2007-08-29 15:23             ` Alexander Graf
2007-08-29 15:44               ` Paul Jakma
2007-09-01 15:23               ` Chris Wilson

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=20070827202748.GK9043@redhat.com \
    --to=berrange@redhat.com \
    --cc=et-mgmt-tools@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).