linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs RAID5 or btrfs on md RAID5?
Date: Mon, 20 Oct 2025 12:31:20 +0300	[thread overview]
Message-ID: <CAA91j0UczP5WpCM2ZDqCEAy-6gSFzWgBE4aGVLxLCJ90H77A+w@mail.gmail.com> (raw)
In-Reply-To: <20251020090018.GA1446208@tik.uni-stuttgart.de>

On Mon, Oct 20, 2025 at 12:07 PM Ulli Horlacher
<framstag@rus.uni-stuttgart.de> wrote:
>
>
> Resuming this discussion...
>
> On Mon 2025-09-22 (18:57), Qu Wenruo wrote:
>
> > >>>> So you either run RAID5 for data only
> > >>>
> > >>> This is a mkfs.btrfs option?
> > >>> Shall I use "mkfs.btrfs -m dup" or "mkfs.btrfs -m raid1"?
> > >>
> > >> For RAID5, RAID1 is preferred for data.
> > >
> > > Then the real usable capacity of this volume is only the half?
> >
> > No, metadata is really a small part of the fs.
> >
> > The majority of usable space really depends on the data profile.
> >
> > If you use RAID1 metadata + RAID5 data, I believe only less than 10% of
> > real space is used on RAID1, the remaining is still RAID5.
>
> Sounds like a good compromise solution!
>
> Asuming I have 4 partitions with equal size, then the suggested command to
> create the filesystem would be:
>
> mkfs.btrfs -m raid1 -d raid5 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4
>
> Does this setup help to protect against write hole?
>

No. It simply reduces the damage caused by the write hole. Only the
content of individual files is affected, not the metadata.

  reply	other threads:[~2025-10-20  9:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  7:09 btrfs RAID5 or btrfs on md RAID5? Ulli Horlacher
2025-09-22  7:41 ` Qu Wenruo
2025-09-22  8:28   ` Ulli Horlacher
2025-09-22  9:06     ` Qu Wenruo
2025-09-22  9:23       ` Ulli Horlacher
2025-09-22  9:27         ` Qu Wenruo
2025-10-20  9:00           ` Ulli Horlacher
2025-10-20  9:31             ` Andrei Borzenkov [this message]
2025-09-22  9:43   ` Ulli Horlacher
2025-09-22 10:41     ` Qu Wenruo
2025-10-21  1:02   ` DanglingPointer
2025-10-21 15:46     ` Mark Harmstone
2025-10-21 15:53       ` Christoph Anton Mitterer
2025-10-21 16:15         ` Jukka Larja
2025-10-21 16:45         ` Mark Harmstone
2025-10-21 17:32           ` Andrei Borzenkov
2025-10-21 17:43             ` Mark Harmstone
2025-10-21 19:32           ` Goffredo Baroncelli
2025-10-21 22:19             ` DanglingPointer
2025-09-22  8:07 ` Lukas Straub
2025-09-22  8:50   ` Ulli Horlacher

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=CAA91j0UczP5WpCM2ZDqCEAy-6gSFzWgBE4aGVLxLCJ90H77A+w@mail.gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).