From: Remi Gauvin <remi@georgianit.com>
To: Roman Mamedov <rm@romanrm.net>, waxhead <waxhead@dirtcellar.net>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS list of grievances
Date: Fri, 27 Sep 2024 14:05:49 -0400 [thread overview]
Message-ID: <03de7723-0be2-a153-d264-a1024be3c2b8@georgianit.com> (raw)
In-Reply-To: <20240927212755.5b24ecd4@nvm>
On 2024-09-27 12:27 p.m., Roman Mamedov wrote:
>
> Or if not, then how do you get from there to a consistent state? Run a scrub,
> make the system reread the entire 40 TB of data, correcting errors and lack of
> duplication where necessary.
>
The BTRFS handling of this situation is actually worse.
The often given, (and entirely too simple) answer is to scrub. But this
has several caveats.
1. The system will not detect the error state automatically. So fixing
this requires the admin to be actively monitoring for errors to detect
the missed writes. (regular monitoring of btrfs dev stats and allert on
errors is required.)
2. Any files that are stored on on the device with CoW Disabled will
not be fixed, and the two copies will be different, with no real way to
detect or fix. There are packages that disable CoW on files by
default. (systemd log files, but probably more concerning, and virtual
disk created by libvirt, for example. (Some amount of divergence can
happen at any unclean shutdown in this scenario)
3. I don't have exact math at my fingertips, but with enough failed
writes, the chances of a CRC32 collision of the stale data leaving
unfixed/corrupted data behind gets fairly high.
For reasons of 2 and 3, the only way to fix this without increasing
chance of data corruption is to replace the previously disconnected
drive to a hot spare. (with the -r option to btrfs replace.)
next prev parent reply other threads:[~2024-09-27 18:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-27 11:20 BTRFS list of grievances waxhead
2024-09-27 16:27 ` Roman Mamedov
2024-09-27 18:05 ` Remi Gauvin [this message]
2024-09-27 19:01 ` Colin S
2024-10-02 19:31 ` Chris Murphy
2024-10-02 23:18 ` Colin S
2024-09-28 10:15 ` Paul Jones
2024-09-28 17:51 ` Roman Mamedov
2024-09-27 17:44 ` Mark Harmstone
2024-09-30 21:43 ` Goffredo Baroncelli
2024-10-03 17:10 ` Goffredo Baroncelli
2024-10-03 17:26 ` Remi Gauvin
2024-10-03 18:24 ` Goffredo Baroncelli
2024-10-03 18:32 ` Remi Gauvin
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=03de7723-0be2-a153-d264-a1024be3c2b8@georgianit.com \
--to=remi@georgianit.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=rm@romanrm.net \
--cc=waxhead@dirtcellar.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