public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Ron Edison <ron@idthq.com>,
	kvm@vger.kernel.org, Kevin Wolf <kwolf@redhat.com>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: writeback cache + h700 controller w/1gb nvcache, corruption on power loss
Date: Tue, 24 Apr 2012 16:43:27 +0300	[thread overview]
Message-ID: <4F96ADFF.6000502@redhat.com> (raw)
In-Reply-To: <CAJSP0QXtaKo32dy+AzxR1WMR9P4TgVXBvBb+e8A2jPv0uG9M7w@mail.gmail.com>

On 04/17/2012 11:41 AM, Stefan Hajnoczi wrote:
> > The disk corruption experienced was indeed lost data -- an fsck was necessary for 4 of the guests to boot at all in RW mode, they first came up read only. In the case of one of the guests there was actually files data / data lost after fsck was manually run upon reboot/single user mode. In some cases these were config files, in other database indexes, etc. This one of the 4 guests with the most severe corruption was not usable and we had to revert to a backup and pull current data out of it as much as possible.
>
> Since you used QEMU -drive cache=writeback data loss is expected on
> host power failure.  cache=writeback uses the (volatile) host page
> cache and therefore data may not have made it to the RAID controller
> before power was lost.
>
> Guest file system recovery - either a quick journal replay or a
> painful fsck - is also expected on host power failure.  The file
> systems are dirty since the guest stopped executing without cleanly
> unmounting its file systems.  If you use cache=none or
> cache=directsync then you should get a quick journal replay and the
> risk of a painful fsck should be reduced (most/all of the data will
> have been preserved).

Both cache=writeback and cache=none should result in journal replay if
the guest is using barriers.  If you're using ext4 and data=journal, you
should expect no data loss.  With the defaults you can expect to lost
recently written data (quite a lot with data=writeback) but the
filesystem structure itself should be fine.

Even with cache=directsync you should expect some data loss as the guest
may hold data in its own page cache.

So something unexpected is happening.  Which guests (by OS type) are
failing?

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2012-04-24 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22130654.645.1334462335379.JavaMail.root@sys1.internetdefensetechnologies.com>
2012-04-15  4:16 ` writeback cache + h700 controller w/1gb nvcache, corruption on power loss Ron Edison
2012-04-16  8:34   ` Stefan Hajnoczi
2012-04-16  8:51     ` Ron Edison
2012-04-17  8:41       ` Stefan Hajnoczi
2012-04-24 13:43         ` Avi Kivity [this message]
2012-04-25  3:57     ` Christoph Hellwig

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=4F96ADFF.6000502@redhat.com \
    --to=avi@redhat.com \
    --cc=hch@infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=ron@idthq.com \
    --cc=stefanha@gmail.com \
    /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