public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Nilsson <nikize@gmail.com>
To: kvm@vger.kernel.org
Subject: Corrupt qcow2 image, recovery?
Date: Tue, 16 Mar 2010 19:21:51 +0100	[thread overview]
Message-ID: <4B9FCC3F.3050006@Gmail.com> (raw)

Hi!

I'm running kvm / qemu-kvm on a couple of production servers everything (or at least most things) works as it should.
However today someone thought it was a "good" idea to restart one of the servers and after that the windows 2k3 guest on that server don't boot anymore.

kvm on this server is a bit "outdated": "QEMU PC emulator version 0.9.1 (kvm-83)"
(I guess this is one of the qcow2 corruption bugs, and i can only blame myself for not upgrading kvm sooner.)
The guest.qcow2 is a 21GiB file for a 60GiB disk

i have tried a couple of things kvm-img convert -f qcow2 -O raw guest.qcow2 guest.raw
this stops and does nothing after creating a guest.raw that is 60GiB but only using 60MiB

so mounted the fs from another server running: "QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2)"

and run qemu-img with the same options as above and after a few secs got "qemu-img: error while reading"
and the same 60MiB used by guest.raw

i also tried booting qemu-kvm with a linux guest and this qcow2 image but only get I/O Errors (and no partitions found)

# qemu-img check guest.qcow2
ERROR: invalid cluster offset=0x100000a000          
ERROR OFLAG_COPIED: l2_offset=ee73 refcount=1       
ERROR l2_offset=ee73: Table is not cluster aligned; L1 entry corrupted
ERROR: invalid cluster offset=0x11d441000800000                       
ERROR: invalid cluster offset=0x11d616000800000                       
ERROR: invalid cluster offset=0x11d686000800000                       
ERROR: invalid cluster offset=0x11d953000800000
................(and a loot more in this style, full log can be provided if it would be of help to anybody)



is there any possibility to repair this file, or convert it to a RAW file (even with parts padded that are not "safe" from the qcow2 image), or as a last resort, are there any debug tools for qcow2 images that might be of use?

I have read up on the qcow fileformat but right now i'm a bit short of time, i need the data in this guests disk image, or at least the MS SQL datafiles that are on this disk) i have also checked the qcow2 file and it do contain a NTLDR string and a loot of other NTFS recognized strings so i know that all data is not gone. the question is how can i access it as a Filesystem again?


Any help would be appreciated!

Regards
Christian Nilsson

             reply	other threads:[~2010-03-16 18:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 18:21 Christian Nilsson [this message]
2010-03-17 13:14 ` Corrupt qcow2 image, recovery? RW

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=4B9FCC3F.3050006@Gmail.com \
    --to=nikize@gmail.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