Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Server Boot on RAID1 + BTRFS
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 05 Jul 2003
Posts: 45628
Location: 56N 3W

PostPosted: Sun Mar 04, 2018 8:02 pm    Post subject: Reply with quote


Lots of different block objects have UUIDs.
You can use a uuid in the mdadm --assemble command but you must use the UUID of the raid set.
mdadm -E /dev/sda11
will show it.
He is an example from my /boot.
$ sudo mdadm -E /dev/sda1
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 9392926d:64086e7a:86638283:4138a597

It won't change anything as that step works.

Your debug shows the kernel trying all the filesystems it knows.
Going back to your blkid output we see
 /dev/md8: UUID="751484c4-b9da-43a1-b100-e7cc61dbd8a2" UUID_SUB="4561ee17-ee4b-422c-a5f7-319e3b63e29c" TYPE="btrfs"

That confirms that you have a BTRFS with a subvolume. Its the subvolume that must be mounted as root, not the top level BTRFS filesystem.
The UUIDs here are filesystem UUIDs

You need to mount the object with UUID 4561ee17-ee4b-422c-a5f7-319e3b63e29c as root. That appears to need additional parameters.
There may be some hints on the Arch forums but I've never used BTRFS.

You have the userspace mount command in your initrd
mount UUID=4561ee17-ee4b-422c-a5f7-319e3b63e29c /mnt/root || rescue_shell

That's an educated guess. As I say, I've never used BTRFS.

mount -t btrfs UUID=4561ee17-ee4b-422c-a5f7-319e3b63e29c /mnt/root || rescue_shell
will be faster, as mount will only try btrfs.


Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message

Joined: 25 Feb 2018
Posts: 14
Location: France

PostPosted: Mon Mar 05, 2018 10:12 am    Post subject: Reply with quote

I have tried what you said:

mount -t btrfs UUID=4561ee17-ee4b-422c-a5f7-319e3b63e29c /mnt/root || rescue_shell

but now I am dropped to the rescue shell because the mount command fails.

The error says:

mount: mounting UUID=4561ee17-ee4b-422c-a5f7-319e3b63e29c on /mnt/root failed: no such file or directory
Something went wrong. Dropping to a shell.


Do you have another idea?

I will take a look at the arch forum but my hopes are small to make this *** boot by itself... :P
Back to top
View user's profile Send private message

Joined: 27 Jan 2006
Posts: 303

PostPosted: Wed Mar 14, 2018 12:42 am    Post subject: Reply with quote

Did you ever get this solved?

Also, did you try either the UUID or just /dev/md11 instead of the UUID_SUB ?
What's your kernel's boot commandline (/etc/default/grub)
or linux line in /boot/grub/grub.cfg

something like
linux /kernel-genkernel-x86_64-3.17.0-gentoo root=UUID=[...] ro single rootflags=subvol=root dolvm vconsole.keymap=us splash vga=791 quiet

or maybe subvol=/
or maybe subvolid=5

What does "btrfs filesystem show /dev/md11" show?

Did you look either of these gentoo guides:
or the arch guide:

Curious, why are you putting btrfs on top of mdadm raid1?
Why not just use btrfs to create raid1 from your partitions?
btrfs's raid1 is supposedly fairly stable and if btrfs handles the raid1 itself, then it can correct any errors if it should find any bitrot. On the other hand,
btrfs allows you to only boot once in degraded mode (after that you're locked out).

Also why all those partitions instead of just using btrfs subvolumes?
I guess if btrfs's quota is still buggy, then using physical partitions
instead of btrfs's namespaces would prevent eg.
an errant log file growing too large and running out of free space,
or if you need encryption so need btrfs on top of luks on top of mdadm raid.

Just curious as I'm considering re-installing two computer systems and am trying to decide on partition schemes and filesystems. I've been running sabayon on laptop with btrfs and full disk encryption without problems for a couple years now. My desktops are mdadm raid1 (2 hd @ 2TB each) + LVM + ext4. Adding a 3rd 2TB hard drive and was considering growing the mdadm raid1 to raid5 (4TB) or repartitioning and going with btrfs's raid1 (3TB)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2
Page 2 of 2

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum