Coder Social home page Coder Social logo

zhangyoujia / qcow2-dump Goto Github PK

View Code? Open in Web Editor NEW
25.0 7.0 12.0 16.76 MB

qcow2-dump is a useful tool for checking and repairing damaged qcow2 image, it has some improvements compare with qemu-img check command (qcow2-dump has all functions which qemu-img check command has).

c qemu qcow2 check repair image qemu-img

qcow2-dump's Introduction

YOUPLUS's tools

YOUPLUS's tools

qcow2-dump

=========================================================================

qcow2镜像检测与修复

author

个人简介

author

qcow2-dump实现框架

code

version

code

Copyright (c) 2016-2024 YOUPLUS

Author: YOUPLUS([email protected])

qcow2-dump is a useful tool for checking and repairing damaged qcow2 image, it has some improvements compare with qemu-img check command (qcow2-dump has all functions which qemu-img check command has).

what's error?        (type of error)
where's error?       (posistion of error)
Can it be repaired?
How to repair it?    (repairing advice)

Usage

qcow2-dump [opts] <qcow2_image>

qcow2-dump -h

Usage: qcow2-dump [-l] [-f] [-m info|check|error|dump] [-o refcount|snapshot|all] [-s active|inactive|all|id/name] filename

-h | --help
-v | --version
-H | --header
-K | --dmesg
-l | --lock
-f | --flags
-b | --base
-c | --compress
-M | --mark     corrupt|dirty
-C | --clean    corrupt|dirty
-V | --value    dec/hex value
-O | --offset   dec/hex offset
-S | --src      dec/hex offset
-F | --file     source of -m copy
-w | --width    1/2/4/8/... byte(s)
-A | --apply    snapshot[N]|snapshot id/name
-D | --delete   snapshot[N]|snapshot id/name
-E | --exclude  snapshot[N]|snapshot id/name
-d | --display  off|color [default: color]
-o | --output   refcount|snapshot|all [default: all]
-s | --snapshot active|inactive|all|id/name [default: all]
-R | --repair   off|check|leak|error|reuse|discard|all [default: check]
-m | --mode     info|check|error|dump|edit|copy|rebase [default: check]

[SAFE OPERATION]:
eg: qcow2-dump -m info filename

eg: qcow2-dump [-m check] [-K] filename
eg: qcow2-dump [-m check] [-K] -c filename
eg: qcow2-dump [-m check] [-K] -l filename

eg: qcow2-dump -m error [-K] filename
eg: qcow2-dump -m error [-K] -c filename
eg: qcow2-dump -m error [-K] -l filename

eg: qcow2-dump -m dump  [-K] filename > /var/dump.log
eg: qcow2-dump -m dump  [-K] -c filename > /var/dump.log
eg: qcow2-dump -m dump  [-K] -f filename > /var/dump.log
eg: qcow2-dump -m dump  [-K] -l filename > /var/dump.log

[DANGEROUS OPERATION]:
eg: qcow2-dump -A snapshot id/name filename
eg: qcow2-dump -A snapshot[N] filename
eg: qcow2-dump -D snapshot id/name filename
eg: qcow2-dump -D snapshot[N] filename
eg: qcow2-dump -D all filename
eg: qcow2-dump -E snapshot id/name filename
eg: qcow2-dump -E snapshot[N] filename
eg: qcow2-dump -E 0 filename

eg: qcow2-dump -R leak|error|reuse|discard|all filename

eg: qcow2-dump -m rebase -F backing_file [-b] filename

eg: qcow2-dump -m edit -O offset -V value [-w 8] filename
eg: qcow2-dump -m edit -O offset -V value -w 1/2/4/8 filename

eg: qcow2-dump -m copy -O offset -S offset -w length filename
eg: qcow2-dump -m copy -O offset -S offset -w length [-F source] filename

eg: qcow2-dump -C corrupt filename
eg: qcow2-dump -M corrupt filename

[EXAMPLES]:
eg: qcow2-dump [-m check] filename > /dev/null; echo $?
eg: qcow2-dump [-m check] -d none filename > /var/check.log
eg: qcow2-dump -m error filename > /var/error.log
eg: qcow2-dump -m error -R none filename > /var/error.log
eg: qcow2-dump -m error -o refcount filename > /var/refcount.log
eg: qcow2-dump -m error -o snapshot filename > /var/snapshot.log
eg: qcow2-dump -m error -s active filename > /var/active.log
eg: qcow2-dump -m error -s inactive filename > /var/inactive.log
eg: qcow2-dump -m dump  -o refcount filename > /var/refcount.log
eg: qcow2-dump -m dump  -o snapshot filename > /var/snapshot.log
eg: qcow2-dump -m dump  -o snapshot -s active filename > /var/active.log
eg: qcow2-dump -m dump  -o snapshot -s 1 filename > /var/snapshot1.log
eg: qcow2-dump -m dump  -o snapshot -s inactive filename > /var/inactive.log
eg: qcow2-dump -m dump  -f -o snapshot -s active filename > /var/active.log

Help

useage

Header

qcow2_header

Qcow2 Layout

qcow2 layout

Discussion Email

email

email

email

Examples

qcow2-dump filename

corrupt

qcow2-dump -m error filename

reuse

qcow2-dump -R all filename

rebuild

Subcluster

rebuild

Subcluster Bitmap

rebuild

qcow2-dump's People

Contributors

zhangyoujia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

qcow2-dump's Issues

source code?

As i see this is binary, does it possible to provide source code?

Not a Issue at all, its working!

Just wanted to leave a comment, due to the reason there is no source code here.
I used that tool to repair a qcow2 file that is multiple TiBs big, using the qemu-img tool I always got an error that the file is too big: [ERROR File too large](qemu-img: ERROR writing refblock: File too large)
This tool repaired the file with no problems at all!
zhangyoujia: You are my hero today!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.