All of lore.kernel.org
 help / color / mirror / Atom feed
From: RW <kvm@tauceti.net>
To: Christian Nilsson <nikize@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Corrupt qcow2 image, recovery?
Date: Wed, 17 Mar 2010 14:14:16 +0100	[thread overview]
Message-ID: <4BA0D5A8.3060805@tauceti.net> (raw)
In-Reply-To: <4B9FCC3F.3050006@Gmail.com>

Liang Guo gave me this advice some weeks ago:

> you may use kvm-nbd or qemu-nbd to present kvm image
> as a NBD device, so
> that you can use nbd-client to access them. eg:
>
> kvm-nbd /vm/sid1.img
> modprobe nbd
> nbd-client localhost 1024 /dev/nbd0
> fdisk -l /dev/nbd0

Didn't work for me because I always got a segfault
but maybe it work's for you.

- Robert




On 03/16/10 19:21, Christian Nilsson wrote:
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-03-17 13:15 UTC|newest]

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

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=4BA0D5A8.3060805@tauceti.net \
    --to=kvm@tauceti.net \
    --cc=kvm@vger.kernel.org \
    --cc=nikize@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.