[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] qemu-img resize corrupted image?
From: |
Ray Morris |
Subject: |
[Qemu-discuss] qemu-img resize corrupted image? |
Date: |
Sat, 19 Oct 2013 18:48:42 -0700 (PDT) |
qemu-img resize seems to have ruined a disk image in a way that is mysterious,
at least to me. I wonder whether it did something it's not supposed to do,
or if the documentation could be clearer that it will wreck an image in certain
cases.
Also, I'm curious if someone could point me in the right direction to possibly
retrieve the data. Although I have some experience recovering damaged RAID |
arrays and bad LVM scenarios, qcow2 is totally new to me. One thing I've
learned about data recovery is that it's easy to make the situation worse if
you
don't know what you're doing, and with qcow2 I'm definitely a newbie.
Though we have backups, this occurred during maintenance on the backup system,
so backups are several days old.
I used qemu-img resize and it seems to have corrupted the image such that it's
no longer recognized as bootable, qemu-img check
prints many errors, and a guest cannot see the partition table it once had.
Here are the exact commands from history:
Initial creation, a long time ago:
qemu-img create -f qcow2 /home/rob/idiom-muscle-prod.img 800G
After getting errors that no space was available (though it appeared there
was), I ran:
qemu-img resize /home/rob/idiom-muscle-prod.img +50GB
qemu-img check -f qcow2 /home/rob/idiom-muscle-prod.img
has the following output:
Warning: cluster offset=0x313630370a000000 is after the end of the image file,
can't properly check refcounts.
Warning: cluster offset=0x56380a5431330000 is after the end of the image file,
can't properly check refcounts.
Warning: cluster offset=0x56380a5431340000 is after the end of the image file,
can't properly check refcounts.
ERROR l2_offset=56380a5431333832: Table is not cluster aligned; L1 entry
corrupted
Warning: cluster offset=0x3037383232330000 is after the end of the image file,
can't properly check refcounts.
Warning: cluster offset=0x3037383232340000 is after the end of the image file,
can't properly check refcounts.
ERROR l2_offset=3037383232330a4b: Table is not cluster aligned; L1 entry
corrupted
... (a few thousand such lines) ...
ERROR cluster 0 refcount=1 reference=3
Leaked cluster 4 refcount=1 reference=0
Leaked cluster 5 refcount=1 reference=0
Leaked cluster 6 refcount=1 reference=0
Leaked cluster 7 refcount=1 reference=0
Leaked cluster 8 refcount=1 reference=0
(a hundred thousand similar lines)
The resize was by qemu-img version 0.12.1, using the CentOS RPM (Red Hat
source).
Another note that may or may not be relevant. The qemu-resize was precipitated
when, after an unclean shutdown, the guest
was unable to write to the drive when the host was rebooted. The error
messages indicated no space available, though "df"
said otherwise. The guest DID boot before the resize, though. After the
reboot, the guest didn't recognize the image as a
bootable disk and the guest's partition table (on the image) was no longer
detectable.
Gneerally I'm pretty good with data recovery, having recovered from some
interesting LVM situations, lost partition tables, etc.,
but qcow2 is completely new to me and I don't want to make something worse in
my attempts to recover it.
Thank you for any pointers you may provide.
Ray Morris
- [Qemu-discuss] qemu-img resize corrupted image?,
Ray Morris <=