public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Rory Campbell-Lange <rory@campbell-lange.net>
To: Roman Mamedov <rm@romanrm.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: trouble replacing second disk from pair
Date: Wed, 8 Dec 2021 17:21:51 +0000	[thread overview]
Message-ID: <YbDpr5mlHhGhHGwd@campbell-lange.net> (raw)
In-Reply-To: <20211208180955.170c6138@nvm>

On 08/12/21, Roman Mamedov (rm@romanrm.net) wrote:
> On Wed, 8 Dec 2021 12:40:14 +0000
> Rory Campbell-Lange <rory@campbell-lange.net> wrote:
> 
> > We're trying to upgrade the disks in a btrfs pair, and I have successfully replaced one of them using btrfs replace. I presently have 
> > 
> > Label: 'btrfs-bkp'  uuid: da90602a-b98e-4f0b-959a-ce431ac0cdfa
> > 	Total devices 2 FS bytes used 700.29GiB
> > 	devid    2 size 2.73TiB used 1.73TiB path /dev/mapper/cdisk4
> > 	devid    3 size 2.73TiB used 1.75TiB path /dev/mapper/cdisk2
> > 
> > I'd like to get rid of cdisk2 and replace it with a new disk.
> > 
> > However I'm unable to mount cdisk4 (the new disk) in degraded mode to allow me to similarly replace cdisk2 as I previously did for cdisk3. Is this because some of the data in only on cdisk2? If so I'd be grateful to 
> > know how to ensure the two disks have the same data and to allow cdisk2 to be replaced.
> 
> Looks like you need to ensure everything is RAID1 first:
> 
>   btrfs balance start -dconvert=raid1,soft /bkp
>   btrfs balance start -mconvert=raid1,soft /bkp
>   btrfs balance start -sconvert=raid1,soft /bkp
> 
> It might warn you about operating on system chunks, but I believe this still
> needs to be done. 

I wasn't able to run system chunks (-s) on btrfs 4.20.1-2 (debian) without
forcing it:

    ERROR: Refusing to explicitly operate on system chunks.
    Pass --force if you really want to do that.

Happily everything worked fine after running the data and metadata balances.

Thanks very much indeed for the advice.

Rory

  reply	other threads:[~2021-12-08 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 12:40 trouble replacing second disk from pair Rory Campbell-Lange
2021-12-08 13:09 ` Roman Mamedov
2021-12-08 17:21   ` Rory Campbell-Lange [this message]
2021-12-08 18:01     ` Zygo Blaxell
2021-12-08 18:15       ` Roman Mamedov

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=YbDpr5mlHhGhHGwd@campbell-lange.net \
    --to=rory@campbell-lange.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.net \
    /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