From: Amir Goldstein <amir73il@gmail.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: "Ted Ts'o" <tytso@mit.edu>,
linux-ext4@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH 4/4] e2fsck: Add QCOW2 support
Date: Wed, 9 Mar 2011 19:52:51 +0200 [thread overview]
Message-ID: <AANLkTi=7w_cWdgxnGTCfARqOESO3eBX66e37d5O8yYYO@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1103091721120.5562@dhcp-27-109.brq.redhat.com>
On Wed, Mar 9, 2011 at 6:30 PM, Lukas Czerner <lczerner@redhat.com> wrote:
>
> --snip--
>> >
>> > Did you consider the possibility to use QCOW2 format for doing a "tryout"
>> > fsck on the filesystem with the option to rollback?
>> >
>> > If QCOW2 image is created with the 'backing_file' option set to the origin
>> > block device (and 'backing_fmt' is set to 'host_device'), then qemu-nbd
>> > will be able to see the exported image metadata as well as the filesystem
>> > data.
>> >
>> > You can then do an "intrusive" fsck run on the NBD, mount your filesystem
>> > (from the NBD) and view the results.
>> >
>> > If you are satisfied with the results, you can apply the fsck changes to the
>> > origin block device (there is probably a qemu-img command to do that).
>> > If you are unsatisfied with the results, you can simply discard the image
>> > or better yet, revert to a QCOW2 snapshot, which you created just before
>> > running fsck.
>>
>> But this is something you can do even now. You can mount the qcow2
>> metadata image without any problems, you just will not see any data. But
>> I can take a look at this functionality, it seems simple enough.
>
> So I have done this and it works as expected as long as the device
> you've created the image from is present in the system, which might not
> be true, especially in the case you are transferring the image to the
> another machine (bug report).
>
> If the device with the same name as the original does not exist in the
> system qemu-nbd is not smart enough to just ignore that fact and mount
> the image anyway. And looking at the man page there is no way to do it.
>
> So, the result is I am not going to include this into my patches (if
> someone does not change my mind:)) as I do not want to create just-another
> switch for e2image. Also I fail to see the benefit if it anyway:).
>
The benefit is, as I see it, is with the following capability:
A user with a corrupted fs, sends an e2image to an expert,
having him examine the file system (so far we already have).
Then the expert can fix the fs image (say using hard core debugfs'ing) and
send it back to the user.
The user can then "test mount" the fixed fs and if his valuable data is back,
send the other half of the payment to the expert, apply the fix to the origin
device and go on with his life.
It's a shame that qemu-nbd doesn't play along with that plan, but you can't
blame it, can you...
Anyway, thanks for testing my idea and thanks for QCOW2 e2image :-)
This is just one example of the nice things that the new e2image format
can be leveraged to.
Amir.
next prev parent reply other threads:[~2011-03-09 17:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 12:49 [PATCH 1/4] e2image: Add support for qcow2 format Lukas Czerner
2011-02-25 12:49 ` [PATCH 2/4] e2image: Support for conversion QCOW2 image into raw Lukas Czerner
2011-02-25 12:49 ` [PATCH 4/4] e2fsck: Add QCOW2 support Lukas Czerner
2011-02-26 16:44 ` Ted Ts'o
2011-02-28 9:44 ` Rogier Wolff
2011-03-01 11:42 ` Lukas Czerner
2011-03-07 10:40 ` Amir Goldstein
2011-03-07 12:40 ` Lukas Czerner
2011-03-09 16:30 ` Lukas Czerner
2011-03-09 17:52 ` Amir Goldstein [this message]
2011-03-17 13:05 ` Lukas Czerner
2011-02-26 16:28 ` [PATCH 1/4] e2image: Add support for qcow2 format Ted Ts'o
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='AANLkTi=7w_cWdgxnGTCfARqOESO3eBX66e37d5O8yYYO@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/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).