You are not logged in.

#1 2015-02-06 00:44:55

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Solved: boot into btrfs raid fails

Two disks, /dev/sda and /dev/sdb. Each have a 100M ext4 partition (/dev/sda1 and /dev/sdb1), and the rest is btrfs (/dev/sda2 and /dev/sdb2), created as

mkfs.btrfs -f -m raid1 -d raid1 /dev/sda2 /dev/sdb2

/dev/sda1 is mounted as /boot

Ramdisk:

mkinitcpio -p linux

where /etc/mkinitcpio.d/linux.preset is:

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default')
BINARIES="/usr/bin/btrfsck"

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
default_options="-S autodetect"

I install grub with

grub-install ... --recheck /dev/sda

During boot, after the grub screen, I get:

mount: wrong fs type, bad option, bad superblock on /dev/sda2

dmesg seems to indicate that it recognized btrfs because it says it found "BTRFS skinny extents" but then

BTRFS: failed to read the system array on sda2

When booting off a separate drive, I can mount /dev/sda2 and/or /dev/sdb2 just fine, and the array gets assembled correctly.

Perhaps I am missing some kind of "probe disks for btrfs RAID" statement somewhere? In the emergency shell that I'm getting, I don't seem to have access to any btrfs tools.

(The strange part is that I think, earlier today, with the same hardware and configuration, it seemed to work. I may be wrong.)

Last edited by jernst (2015-02-06 17:46:20)

Offline

#2 2015-02-06 15:30:52

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: Solved: boot into btrfs raid fails

Hmmm. It should work. I installed Arch to a two-drive btrfs RAID and everything just took off and worked. I was kind of surprised that I didn't have to take any special action for a btrfs hook, but it just worked. I'll look around and see if I can find anything.

Tim

PS - Did you make your btrfs to the top-level disk partitions, or did you make a root subvolume?

PPS - You definitely need to install package btrfs-progs.

Last edited by ratcheer (2015-02-06 15:37:21)

Offline

#3 2015-02-06 15:40:59

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: Solved: boot into btrfs raid fails

Be sure to look at this. My installation was prior to this problem.

https://wiki.archlinux.org/index.php/Bt … ree_failed

Tim

Offline

#4 2015-02-06 16:48:27

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: Solved: boot into btrfs raid fails

ratcheer: You are right! Putting

MODULES=('btrfs')

into /etc/mkinitcpio.d/linux.preset, and regenerating seems to have solved it.

Thanks, everyone, this is an amazing community!

Offline

#5 2015-02-06 17:40:20

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: Solved: boot into btrfs raid fails

You are welcome. Please edit the title of your top post to indicate [Solved].

Tim

Offline

#6 2015-02-07 00:02:25

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 290
Website

Re: Solved: boot into btrfs raid fails

One more addition: for this to work, it appears the kernel version on the temporary system (the one that is booted when the ram disk is created), and the final system (what I'm attempting to install) must be the same.

(This may not be correct; however, I just had different kernels and the system failed to boot. Once corrected, it did boot.)

Offline

Board footer

Powered by FluxBB