qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Alexander Marx <copymaster@howtolinux.de>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] Please help corrupt filesystem image
Date: Mon, 18 Feb 2019 10:51:41 +0100	[thread overview]
Message-ID: <20190218095141.GA5303@dhcp-200-176.str.redhat.com> (raw)
In-Reply-To: <1ee13520-b5f2-b539-7112-4e7de79e7c16@howtolinux.de>

Am 17.02.2019 um 05:13 hat Alexander Marx geschrieben:
> Dear List!
> 
> I have a big problem and hope you can help me.
> I built a new windows 2016 domain with virtual servers. 2 dc and 9 rds
> hosts.
> I was nearly finished with the setup and ready to migrate the users from
> old to new domain.
> 
> Then i had to restart the physical servers. Unfortunately 1 dc and 2 rds
> hosts could not be startet anymore.
> Error says:
> 
> qemu-img: Could not open 'vm-150-disk-0.qcow2': Could not read qcow2
> header: Input/output error

The very first thing the qcow2 driver in QEMU does is reading in the
image file header, and this is the step that produces the error message
you quoted. This is before even looking at any content of the file. So
it looks to me as if the image file was corrupted on the file system
level or even had bad sectors on the physical hard disk.

You can try running 'qemu-img check' under 'strace -f' and double check
which syscall returns an error before it errors out. I think it will be
the first pread64() call, returning EIO. If not, please post the output
you're getting.

Another thing you could try is whether the image file is still
accessible for tools like cp, dd or hexdump.

If these tests confirm that there is a more general problem with the
file, running fsck for your host file system that contains the image
might be a good idea.

> Even worst, a qemu-img check  also gave that error. and i was not able
> to do anything i found in the internet to fix it.
> always that error or the qemu-img could not determine the format.
> 
> Is there a chance to fix these images? What can i do?
> 
> I have no backup because the domain was not fully configured. But if i
> have to rebuild the whole domain, i will need several weeks for it.
> Any help is appreciated.

If only the header is inaccessible, reconstructing it may be possible.
Otherwise, probably not.

We can look into this if your results for the above show that you can
still access the image outside of QEMU, and what exactly is even going
wrong.

Kevin

  reply	other threads:[~2019-02-18  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17  4:13 [Qemu-devel] Please help corrupt filesystem image Alexander Marx
2019-02-18  9:51 ` Kevin Wolf [this message]
2019-02-18 10:31   ` Alexander Marx
  -- strict thread matches above, loose matches on Subject: below --
2019-02-17  3:54 Alexander Marx
2019-02-18 20:54 ` John Snow
2019-02-19  4:05   ` Alexander Marx

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=20190218095141.GA5303@dhcp-200-176.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=copymaster@howtolinux.de \
    --cc=qemu-block@nongnu.org \
    --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).