Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "Chris Murphy" <lists@colorremedies.com>,
	"Jakob Schöttl" <jschoett@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Cannot 'mount -o degraded /dev/replacement' after a replace
Date: Mon, 11 Feb 2019 09:36:53 +0800
Message-ID: <4b89cb69-34da-9e98-d288-141a0a9900af@gmx.com> (raw)
In-Reply-To: <CAJCQCtSY8JR4G5JKLaKn-uT=CV+SMDom0j3Nt98wEOE9k=F-uQ@mail.gmail.com>

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



On 2019/2/11 上午2:44, Chris Murphy wrote:
> On Sat, Feb 9, 2019 at 3:36 AM Jakob Schöttl <jschoett@gmail.com> wrote:
>>
>> Replace device 2 with device 3:
>>
>>    mount -o degraded /dev/loop1 /mnt
>>    btrfs filesystem show   # to get devid of device 2
>>    btrfs replace start -Br 2 /dev/loop3 /mnt
>>    btrfs replace status /mnt   # check success
>>    umount /mnt
> 
> The first command causes the creation of metadata and system chunk
> using single profile, on loop1, and even after a replace, both devices
> know that there is a single and required chunk on loop1. So subsequent
> degraded mount fails because the volume was not fully redundant.
> 
> The missing step is between 'btrfs replaced start' completing, and
> umount. There needed to be at least a 'btrfs fi us' to check if there
> are any single chunks and to convert them with 'btrfs balance start
> -dconvert=raid1,soft -mconvert=raid1,soft' where soft is only possible
> if there were no data writes while degraded; if there were degraded
> writes, a scrub is also necessary to make sure any single mirror raid1
> chunk writes to the degraded device are replicated to the replacement.
> 
> Yep - kinda ugly. And not intuitive. But that's the present status.

Not exactly.

Currently the problem is, there is extra DUP sys/meta/data chunks created.
So despite the SINGLE chunks, we still can't mount it degraded.

IIRC there is some patch trying to address the SINGLE problem, but the
DUP one seems to be something new.

Thanks,
Qu

> 
> 


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

      reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-09 10:36 Jakob Schöttl
2019-02-09 12:16 ` Qu Wenruo
2019-02-09 13:45   ` Jakob Schöttl
2019-02-09 15:32     ` Andrei Borzenkov
2019-02-09 15:57       ` Jakob Schöttl
2019-02-09 15:36 ` Andrei Borzenkov
2019-02-10 18:44 ` Chris Murphy
2019-02-11  1:36   ` Qu Wenruo [this message]

Reply instructions:

You may reply publically 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=4b89cb69-34da-9e98-d288-141a0a9900af@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=jschoett@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox