From: Chris Murphy <lists@colorremedies.com>
To: Norbert Preining <norbert@preining.info>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: replacing a disk in a btrfs multi disk array with raid10
Date: Mon, 3 Aug 2020 00:15:32 -0600 [thread overview]
Message-ID: <CAJCQCtSeZCVpnxeip6D1nRb-nuvTYyJdY2SFWeDUQMV0BnAbyw@mail.gmail.com> (raw)
In-Reply-To: <20200803052651.GA685777@bulldog.preining.info>
On Sun, Aug 2, 2020 at 11:51 PM Norbert Preining <norbert@preining.info> wrote:
>
> Hi all
>
> (please Cc)
>
> I am running Linux 5.7 or 5.8 on a btrfs array of 7 disks, with metadata
> and data both on raid1, which contains the complete system.
> (btrfs balance start -dconvert=raid1 -mconvert=raid1 /)
>
> Although btrfs device stats / doesn't show any errors, SMART warns about
> one disk (reallocated sector count property) and I was pondering
> replacing the device.
Some of these are considered normal. I suggest making sure each
drive's SCT ERC value is less than the SCSI command timer. You want
the drive to give up on reading a sector before the kernel considers
the command "overdue" and does a link reset - losing the contents of
the command queue. Upon read error, the drive reports the sector LBA
so that Btrfs can automatically do a fixup.
More info here. It applies to mdadm, lvm, and Btrfs raid.
https://raid.wiki.kernel.org/index.php/Timeout_Mismatch
Once you've done that, do a btrfs scrub.
>
> What is the currently suggested method given that I cannot plug in
> another disk into the computer, all slots are used up (thus a btrfs
> replace will not work as far as I understand).
btrfs replace will work whether the drive is present or not. It's just
safer to do it with the drive present because you don't have to mount
degraded.
> Do I need to:
> - shutdown
> - pysically replace disk
> - reboot into rescue system
> - mount in degraded mode
> - add the new device
Use 'btrfs replace'
> - resize the file system (new disk would be bigger)
Currently 'btrfs replace' does require a separate resize step. 'device
add' doesn't, resize is implied by the command.
> - start a new rebalancing
> (for the rebalance, do I need to give the
> same -dconvert=raid1 -mconvert=raid1 arguments?)
Not necessary. But it's worth checking 'btrfs fi us -T' and making
sure everything is raid1 as you expect.
--
Chris Murphy
next prev parent reply other threads:[~2020-08-03 6:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 5:26 replacing a disk in a btrfs multi disk array with raid10 Norbert Preining
2020-08-03 6:15 ` Chris Murphy [this message]
2020-08-03 7:47 ` Norbert Preining
2020-10-09 4:20 ` Norbert Preining
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=CAJCQCtSeZCVpnxeip6D1nRb-nuvTYyJdY2SFWeDUQMV0BnAbyw@mail.gmail.com \
--to=lists@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=norbert@preining.info \
/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).