linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.de>
To: Andrei Borzenkov <arvidjaar@gmail.com>,
	Remi Gauvin <remi@georgianit.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH RFC] btrfs: Don't create SINGLE or DUP chunks for degraded rw mount
Date: Wed, 13 Feb 2019 08:44:06 +0800	[thread overview]
Message-ID: <eb285e0c-adb8-95b8-c366-2f5806116c0c@suse.de> (raw)
In-Reply-To: <d1093c59-f432-b2b6-ca53-e46414c945a6@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1911 bytes --]



On 2019/2/13 上午2:42, Andrei Borzenkov wrote:
> 12.02.2019 10:47, Qu Wenruo пишет:
>>
>>
>> On 2019/2/12 下午3:43, Remi Gauvin wrote:
>>> On 2019-02-12 2:22 a.m., Qu Wenruo wrote:
>>>
>>>>> Does this mean you would rely on scrub/CSUM to repair the missing data
>>>>> if device is restored?
>>>>
>>>> Yes, just as btrfs usually does.
>>>>
>>>
>>> I don't really understand the implications of the problems with mounting
>>> fs when single/dup data chunk are allocated on raid1,
>>
>> Consider this use case:
>>
>> One btrfs with 2 devices, RAID1 for data and metadata.
>>
>> One day devid 2 got failure, and before replacement arrives, user can
>> only use devid 1 alone. (Maybe that's the root fs).
>>
>> Then new disk arrived, user replaced the missing device, caused SINGLE
>> or DUP chunks on devid 1, and more importantly, some metadata/data is
>> already in DUP/SINGLE chunks.
>>
>> Then some days later, devid 1 get failure too, now user is unable to
>> mount the fs degraded RW any more, since SINGLE/DUP chunks are all on
>> devid 1, and no way to replace devid 1.
>>
> 
> But if I understand what happens after your patch correctly, replacement
> device still does not contain valid data until someone does scrub.

Nope. That's incorrect.

We still go through normal device replace routine, which will copy data
from degraded chunks to new device.

Thanks,
Qu

> So in
> either case manual step is required to restore full redundancy.
> 
> Or does "btrfs replace" restore content on replacement device automatically?
> 
>> Thanks,
>> Qu
>>
>>> but I would think
>>> that would actually be a preferable situation than filling a drive with
>>> 'data' we know is completely bogus... converting single/dup data to raid
>>> should be much faster than tripping on CSUM errors, and less prone to
>>> missed errors?
>>>
>>>
>>
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2019-02-13  0:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  7:03 [PATCH RFC] btrfs: Don't create SINGLE or DUP chunks for degraded rw mount Qu Wenruo
2019-02-12  7:20 ` Remi Gauvin
2019-02-12  7:22   ` Qu Wenruo
2019-02-12  7:43     ` Remi Gauvin
2019-02-12  7:47       ` Qu Wenruo
2019-02-12  7:55         ` Remi Gauvin
2019-02-12  7:57           ` Qu Wenruo
2019-02-12 18:42         ` Andrei Borzenkov
2019-02-12 19:09           ` Remi Gauvin
2019-02-13  0:44           ` Qu Wenruo [this message]
     [not found] <173bc320-4d67-6752-86cb-119dc9fb9a69@dial.pipex.com>
2021-02-21  9:36 ` tai63

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=eb285e0c-adb8-95b8-c366-2f5806116c0c@suse.de \
    --to=wqu@suse.de \
    --cc=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=remi@georgianit.com \
    /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).