From: Matt Huszagh <huszaghmatt@gmail.com>
To: Roman Mamedov <rm@romanrm.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: How to replace a failing device
Date: Thu, 03 Nov 2022 14:39:14 -0700 [thread overview]
Message-ID: <87sfiz3egt.fsf@gmail.com> (raw)
In-Reply-To: <20221103171848.540a9056@nvm>
Roman Mamedov <rm@romanrm.net> writes:
> If your backup is incremental and only copies modified files, you can ensure
> all other files are also readable by recursively reading them:
>
> find -type f -print0 | xargs -0 cat > /dev/null
>
> ...for a kind of manual scrub. Unless you had nocow/nodatasum files in there,
> any damaged ones will return a read error thanks to Btrfs checksums.
>
> Or maybe you could check if Btrfs scrub has also stopped hanging, given there
> are no disk-level unreadable sectors anymore. (And after you have also
> upgraded the kernel).
I was able to run btrfs scrub successfully with the problematic drive
removed. Logs show that the following file has a checksum error:
BTRFS warning (device dm-0): checksum error at logical 10087829524480 on dev /dev/dm-4, physical 1883324207104, root 28842, inode 27543115, offset 74526720, length 4096, links 1 (path: matt/.recoll/library/xapiandb/docdata.glass)
What can I do to get BTRFS to no longer report a checksum error? Do I
need to delete this along with all snapshots that contain it?
> Btrfs currently does not seem to be famous for smooth disk replacements
> unfortunately, even if you would use RAID.
>
> I would suggest keeping up with the good backup schedule, and then rather than
> using the Btrfs "single" profile stretched across devices, switch to MergerFS.
> That way any disaster on a particular disk leaves other disks and their
> independent filesystems completely unaffected.
Ok, thanks for the input. But in theory, BTRFS with a redundant data
RAID (such as RAID1 or RAID10) should allow scrub to preserve all data
if a single drive fails, no?
I'll spend some time looking at mergerfs.
Matt
next prev parent reply other threads:[~2022-11-03 21:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 19:13 How to replace a failing device Matt Huszagh
2022-11-01 19:32 ` Roman Mamedov
2022-11-01 19:44 ` Roman Mamedov
2022-11-03 3:51 ` Matt Huszagh
2022-11-03 4:19 ` Andrei Borzenkov
2022-11-03 4:25 ` Matt Huszagh
2022-11-03 12:18 ` Roman Mamedov
2022-11-03 21:39 ` Matt Huszagh [this message]
2022-11-03 22:32 ` 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=87sfiz3egt.fsf@gmail.com \
--to=huszaghmatt@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).