linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: spurious full btrfs corruption
Date: Wed, 7 Mar 2018 03:09:58 +0000 (UTC)	[thread overview]
Message-ID: <pan$b11ce$9c4dcdf2$ebac9a1f$a7f5a212@cox.net> (raw)
In-Reply-To: 1520297878.4428.39.camel@scientia.net

Christoph Anton Mitterer posted on Tue, 06 Mar 2018 01:57:58 +0100 as
excerpted:

> In the meantime I had a look of the remaining files that I got from the
> btrfs-restore (haven't run it again so far, from the OLD notebook, so
> only the results from the NEW notebook here:):
> 
> The remaining ones were multi-GB qcow2 images for some qemu VMs.
> I think I had non of these files open (i.e. VMs running) while in the
> final corruption phase... but at least I'm sure that not *all* of them
> were running.
> 
> However, all the qcow2 files from the restore are more or less garbage.
> During the btrfs-restore it already complained on them, that it would
> loop too often on them and whether I want to continue or not (I choose n
> and on another full run I choose y).
> 
> Some still contain a partition table, some partitions even filesystems
> (btrfs again)... but I cannot mount them.

Just a note on format choices FWIW, nothing at all to do with your 
current problem...

As my own use-case doesn't involve VMs I'm /far/ from an expert here, but 
if I'm screwing things up I'm sure someone will correct me and I'll learn 
something too, but it does /sound/ reasonable, so assuming I'm 
remembering correctly from a discussion here...

Tip: Btrfs and qcow2 are both copy-on-write/COW (it's in the qcow2 name, 
after all), and doing multiple layers of COW is both inefficient and a 
good candidate to test for corner-case bugs that wouldn't show up in 
more normal use-cases.  Assuming bug-free it /should/ work properly, of 
course, but equally of course, bug-free isn't an entirely realistic 
assumption. =8^0

... And you're putting btrfs on qcow2 on btrfs... THREE layers of COW!

The recommendation was thus to pick what layer you wish to COW at, and 
use something that's not COW-based at the other layers.  Apparently, qemu 
has raw-format as a choice as well as qcow2, and that was recommended as 
preferred for use with btrfs (and IIRC what the recommender was using 
himself).

But of course that still leaves cow-based btrfs on both the top and the 
bottom layers.  I suppose which of those is best to remain btrfs, while 
making the other say ext4 as widest used and hopefully safest general 
purpose non-COW alternative, depends on the use-case.

Of course keeping btrfs at both levels but nocowing the image files on 
the host btrfs is a possibility as well, but nocow on btrfs has enough 
limits and caveats that I consider it a second-class "really should have 
used a different filesystem for this but didn't want to bother setting up 
a dedicated one" choice, and as such, don't consider it a viable option 
here.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      parent reply	other threads:[~2018-03-07  3:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <26306A4D-2D8E-4661-B89E-9F050FD184D5@scientia.net>
     [not found] ` <BF03A3DF-684D-47FE-A9AD-320256F64763@scientia.net>
     [not found]   ` <b6b4ed0e-9569-158d-19ad-82c885bab4ec@gmx.com>
     [not found]     ` <BB977A40-847C-4611-A468-9BF1137CE711@scientia.net>
     [not found]       ` <d2a14d69-dfa9-8794-6375-03d1b209632f@gmx.com>
     [not found]         ` <68697875-6E77-49C4-B54E-0FADB94700DA@scientia.net>
     [not found]           ` <99ee9b31-a38a-d479-5b1d-30e9c942d577@gmx.com>
     [not found]             ` <A19E863A-F83C-4630-9675-4309CECB318E@scientia.net>
     [not found]               ` <1b24e69e-2c1e-71af-fb1d-9d32f72cc78c@gmx.com>
     [not found]                 ` <8DB99A3B-6238-497D-A70F-8834CC014DCF@gmail.com>
2018-02-28  8:36                   ` Fwd: Re: BUG: unable to handle kernel paging request at ffff9fb75f827100 Qu Wenruo
     [not found]                     ` <1519833022.3714.122.camel@scientia.net>
2018-03-01  1:25                       ` spurious full btrfs corruption Qu Wenruo
2018-03-06  0:57                         ` Christoph Anton Mitterer
2018-03-06  1:50                           ` Qu Wenruo
2018-03-08 14:38                             ` Christoph Anton Mitterer
2018-03-08 23:48                               ` Qu Wenruo
2018-03-16  0:03                                 ` Christoph Anton Mitterer
2018-03-21 22:03                                   ` Christoph Anton Mitterer
2018-03-26 14:32                                   ` Christoph Anton Mitterer
2018-03-07  3:09                           ` Duncan [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='pan$b11ce$9c4dcdf2$ebac9a1f$a7f5a212@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.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).