linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sam tygier <samtygier@yahoo.co.uk>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] Btrfs: Check metadata redundancy on balance
Date: Wed, 07 Oct 2015 09:19:32 +0100	[thread overview]
Message-ID: <5614D594.50905@yahoo.co.uk> (raw)
In-Reply-To: <5611E169.1060902@oracle.com>

On 05/10/15 03:33, Anand Jain wrote:
> 
> Sam,
> 
> On 10/03/2015 11:50 PM, sam tygier wrote:
>> Currently BTRFS allows you to make bad choices of data and
>> metadata levels. For example -d raid1 -m raid0 means you can
>> only use half your total disk space, but will loose everything
>> if 1 disk fails. It should give a warning in these cases.
> 
>   Nice test case. however the way we calculate the impact of
>   lost device would be per chunk, as in the upcoming patch -set.
> 
>      PATCH 1/5] btrfs: Introduce a new function to check if all chunks a OK for degraded mount
> 
>   The above patch-set should catch the bug here. Would you be able to
>   confirm if this patch is still needed Or apply your patch on top of
>   it ?
> 
> Thanks, Anand
> 

If I understand the per-chunk work correctly it is to handle the case 
where although there are not enough disks remaining to guarantee being
able to mount degraded, the arrangement of existing chunks happens to 
allow it (e.g. all the single chunks happen to be on a surviving disk).
So while the example case in "[PATCH 0/5] Btrfs: Per-chunk degradable 
check", can survive a 1 disk loss, the raid levels do not guarantee
survivability of a 1 disk loss after more data is written.

My patch is preventing combinations of raid levels that have poor 
guarantees when loosing disks, but waste disk space. For example
data=raid1 metadata=single, which wastes space by writing the data
twice, but would not guarantee survival of a 1 disk loss (even if the
per-chuck patches allow some 1 disk losses to survive) and could loose
everything if a bit flip happened in a critical metadata chunk.

So I think my patch is useful with or without per-chunk work.

Thanks,
Sam


  reply	other threads:[~2015-10-07  8:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 15:50 [PATCH v2] Btrfs: Check metadata redundancy on balance sam tygier
2015-10-05  2:33 ` Anand Jain
2015-10-07  8:19   ` sam tygier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-03  9:28 sam tygier
2015-12-08  9:25 sam tygier
2016-01-05 14:41 ` David Sterba

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=5614D594.50905@yahoo.co.uk \
    --to=samtygier@yahoo.co.uk \
    --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).