Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Matt Zagrabelny <mzagrabe@d.umn.edu>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: raid1 root device with efi
Date: Sat, 9 Mar 2024 07:32:24 +1030	[thread overview]
Message-ID: <5b35783e-941e-4f1e-9c55-84fd319e6322@gmx.com> (raw)
In-Reply-To: <CAOLfK3UccL8z7Xf_KSp=foS6hM8Byf5n_21uwO96=9ND=-j84A@mail.gmail.com>



在 2024/3/9 07:09, Matt Zagrabelny 写道:
> Greetings,
>
> I've read some conflicting info online about the best way to have a
> raid1 btrfs root device.
>
> I've got two disks, with identical partitioning and I tried the
> following scenario (call it scenario 1):
>
> partition 1: EFI
> partition 2: btrfs RAID1 (/)

This really depends on how you want to setup your bootloader.

In my case, I hate GRUB2 so much that I always go with:

- Partition 1: EFI (also as /boot)
   This includes both the EFI bootloader (systemd-boot), along with
   kernel and its initramfs.

   The disadvantage is, if you go LUKS, your kernel/initramfs will never
   be encrypted, thus exporting some risks (e.g. some attacker with
   physical access to your system can implant some rootkit into your
   initramfs and steal your credential)

- Partition 2: Whatever you want
   It can be btrfs RAID*, or even other fs over LUKS over LVM etc.


>
> There are some docs that claim that the above is possible and others
> that say you need the following scenario, call it scenario 2:
>
> partition 1: EFI
> partition 2: MD RAID1 (/boot)
> partition 3: btrfs RAID1 (/)

At least OpenSUSE TumbleWeed doesn't need a dedicated /boot, and it is
using GRUB2.

So I don't think a dedicated /boot is mandatory.

Thanks,
Qu

>
> What do folks think? Is the first scenario setup possible? or is the
> second setup the preferred way to achieve a btrfs RAID1 root
> filesystem?
>
> The reason I ask is that I followed a guide (for scenario 1) and
> rebooted the computer after each step to verify that things worked.
> After I finished the whole guide, I unplugged one of the disks (with
> the system off) and the BIOS could no longer find the disk. I then
> plugged the disk back in and the BIOS could still not find the disk,
> so something is amiss.
>
> Thanks for any commentary and help!
>
> -m
>

  reply	other threads:[~2024-03-08 21:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 20:39 raid1 root device with efi Matt Zagrabelny
2024-03-08 21:02 ` Qu Wenruo [this message]
2024-03-08 21:46 ` Matthew Warren
2024-03-08 21:48   ` Matt Zagrabelny
2024-03-08 21:54     ` Matthew Warren
2024-03-08 21:58       ` Matt Zagrabelny
2024-03-10 17:57         ` Forza
2024-03-11 14:34           ` Kai Krakow
2024-03-11 19:26             ` Goffredo Baroncelli
2024-03-12 12:39               ` Kai Krakow
2024-03-12 18:55                 ` Goffredo Baroncelli
2024-03-27 20:21           ` Matt Zagrabelny
2024-03-28  4:03             ` Andrei Borzenkov
2024-03-28 11:42             ` Forza

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=5b35783e-941e-4f1e-9c55-84fd319e6322@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mzagrabe@d.umn.edu \
    /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