From: Saint Germain <saintger@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: BTRFS with RAID1 cannot boot when removing drive
Date: Tue, 11 Feb 2014 04:15:27 +0100 [thread overview]
Message-ID: <20140211041527.57ef96c4@system> (raw)
In-Reply-To: <191C3349-9491-44B6-8289-C5B1EDF1F59E@colorremedies.com>
Hello !
On Mon, 10 Feb 2014 19:18:22 -0700, Chris Murphy
<lists@colorremedies.com> wrote :
>
> On Feb 9, 2014, at 2:40 PM, Saint Germain <saintger@gmail.com> wrote:
> >
> > Then I added another drive for a RAID1 configuration (with btrfs
> > balance) and I installed grub on the second hard drive with
> > "grub-install /dev/sdb".
>
> That can't work on UEFI. UEFI firmware effectively requires a GPT
> partition map and something to serve as an EFI System partition on
> all bootable drives.
>
> Second there's a difference between UEFI with and without secure boot.
>
> With secure boot you need to copy the files your distro installer
> puts on the target drive EFI System partition to each addition
> drive's ESP if you want multibooting to work in case of disk failure.
> The grub on each ESP likely looks on only its own ESP for a grub.cfg.
> So that then means having to sync grub.cfg's among each disk used for
> booting. A way around this is to create a single grub.cfg that merely
> forwards to the "true" grub.cfg. And you can copy this forward-only
> grub.cfg to each ESP. That way the ESP's never need updating or
> syncing again.
>
> Without secure boot, you must umount /boot/efi and mount the ESP for
> each bootable disk is turn, and then merely run:
>
> grub-install
>
> That will cause a core.img to be created for that particular ESP, and
> it will point to the usual grub.cfg location at /boot/grub.
>
Ok I need to really understand how my motherboard works (new Z87E-ITX).
It is written "64Mb AMI UEFI Legal BIOS", so I thought it was really
UEFI.
>
> >
> > If I boot on sdb, it takes sda1 as the root filesystem
> > If I switched the cable, it always take the first hard drive as the
> > root filesystem (now sdb)
> > If I disconnect /dev/sda, the system doesn't boot with a message
> > saying that it hasn't found the UUID:
> >
> > Scanning for BTRFS filesystems...
> > mount:
> > mounting /dev/disk/by-uuid/c64fca2a-5700-4cca-abac-3a61f2f7486c
> > on /root failed: Invalid argument
>
> Well if /dev/sda is missing, and you have an unpartitioned /dev/sdb I
> don't even know how you're getting this far, and it seems like the
> UEFI computer might actually be booting in CSM-BIOS mode which
> presents a conventional BIOS to the operating system. Disintguishing
> such things gets messy quickly.
>
/dev/sdb has the same partition as /dev/sda.
Duncan gave me the hint with degraded mode and I managed to boot
(however I had some problem with mounting sda2).
> >
> > Can you tell me what I have done incorrectly ?
> > Is it because of UEFI ? If yes I haven't understood how I can
> > correct it in a simple way.
> >
> > As extra question, I don't see also how I can configure the system
> > to get the correct swap in case of disk failure. Should I force
> > both swap partition to have the same UUID ?
>
> If you're really expecting to create a system that can accept a disk
> failure and continue to work, I don't see how it can depend on swap
> partitions. It's fine to create them, but just realize if they're
> actually being used and the underlying physical device dies, the
> kernel isn't going to like it.
>
> A possible work around is using an md raid1 partition as swap.
>
I understand. Normally the swap will only be used for hibernating. I
don't expect to use it except perhaps in some extreme case.
Thanks for your help !
next prev parent reply other threads:[~2014-02-11 3:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-09 21:40 BTRFS with RAID1 cannot boot when removing drive Saint Germain
2014-02-10 3:34 ` Duncan
2014-02-11 2:30 ` Saint Germain
2014-02-14 14:33 ` Saint Germain
2014-02-16 15:30 ` Saint Germain
2014-02-11 2:18 ` Chris Murphy
2014-02-11 3:15 ` Saint Germain [this message]
2014-02-11 6:59 ` Duncan
2014-02-11 10:04 ` Saint Germain
2014-02-11 20:35 ` Duncan
2014-02-12 17:16 ` Saint Germain
2014-02-11 17:33 ` UEFI/BIOS, was: " Chris Murphy
2014-02-11 7:47 ` Duncan
2014-02-11 17:21 ` Chris Murphy
2014-02-11 17:36 ` Saint Germain
2014-02-11 18:19 ` Chris Murphy
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=20140211041527.57ef96c4@system \
--to=saintger@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).