View previous topic :: View next topic |
Author |
Message |
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Apr 08, 2016 5:34 pm Post subject: rootfs on multi-disk btrfs, do I need an initramfs? |
|
|
Been banging my head against this problem for a few days now... I have a headless, remote server:
/dev/sda and /dev/sdb are both plain MBR disks, with a 512MB partition 1 and the rest as partition 2. sda1 is an ext4 /boot, sda2 is btrfs /, sdb is ignored for now. This setup works fine.
If I mkfs.btrfs sdb2, btrfs device add /dev/sdb2 /, and then try to reboot with that, I get the usual kernel panic message saying it can't find unknown-block(8,2) along with the list of known devices, but that already includes all of the ones above. I've tried adding "rootflags=device=/dev/sda2,device=/dev/sdb2 rootdelay=5" but it didn't help at all. Any idea? |
|
Back to top |
|
|
derk Guru
Joined: 10 Mar 2003 Posts: 347 Location: St Thomas Ontario
|
Posted: Fri Apr 08, 2016 8:07 pm Post subject: |
|
|
you should not be mounting dev/sdb2 over top of /dev/sda2 .. not two root disks only one .. if you want a raid set-up use proper hardware set-up or a software raid .. which will need an initrd/initramfs of some sort .. look on wiki or search for help .. never done this myself |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Apr 08, 2016 9:03 pm Post subject: |
|
|
derk wrote: | you should not be mounting dev/sdb2 over top of /dev/sda2 .. not two root disks only one .. if you want a raid set-up use proper hardware set-up or a software raid .. which will need an initrd/initramfs of some sort .. look on wiki or search for help .. never done this myself |
Maybe I didn't make myself clear enough. This is a Btrfs multidevice volume in RAID1 profile. It mounts perfectly fine from the server's debian netboot recovery environment, but not at boot. I've looked at about 50 different wikis already, nothing says this shouldn't work. |
|
Back to top |
|
|
derk Guru
Joined: 10 Mar 2003 Posts: 347 Location: St Thomas Ontario
|
Posted: Fri Apr 08, 2016 9:21 pm Post subject: |
|
|
so you are not using mdadm ? with mount points /dev/md0, /dev/md1 etc .. what is the debian environment using to manage the disk arrays? does it actually load mdadm? or something else?
I have used a server with hardware raid ..under mandrake in the past and it still used mdadm in the boot process with an initrd ..to manage the device .. boot was on the raid device itself .. not sure about the formatting as I did not set it up. was pre-ext4 .. |
|
Back to top |
|
|
derk Guru
Joined: 10 Mar 2003 Posts: 347 Location: St Thomas Ontario
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Apr 09, 2016 6:54 pm Post subject: |
|
|
derk wrote: | so you are not using mdadm ? with mount points /dev/md0, /dev/md1 etc .. |
No.
Quote: | what is the debian environment using to manage the disk arrays? does it actually load mdadm? or something else? |
ahci and btrfs. I can `mount /dev/sda2 /mnt/gentoo` and it'll DWIM. `btrfs fi show /mnt/gentoo` shows both disks active when they are.
The Gentoo kernel can also interact fine with the 2-disk volume while it's running. Just not mount it as root in that state.
I've tried both GRUB2 and LILO with various combinations of root= device/UUIDs, none worked. |
|
Back to top |
|
|
derk Guru
Joined: 10 Mar 2003 Posts: 347 Location: St Thomas Ontario
|
|
Back to top |
|
|
brepro n00b
Joined: 25 Apr 2016 Posts: 1
|
Posted: Mon Apr 25, 2016 4:45 am Post subject: |
|
|
Error checking has been added into the patched code segment (int err = create_dev ...)
New patch:
Code: |
gentoo - /etc/portage/patches/sys-kernel/gentoo-sources# cat earlydevtmpfs.patch
--- init/do_mounts.c.orig 2016-04-25 14:27:42.264114898 +1000
+++ init/do_mounts.c 2016-04-25 14:28:11.443822879 +1000
@@ -542,6 +542,7 @@
int err = create_dev(saved_root_name, ROOT_DEV);
if (err < 0)
pr_emerg("Failed to create %s: %d\n", saved_root_name, err);
+ devtmpfs_mount("dev");
mount_block_root(saved_root_name, root_mountflags);
} else {
int err = create_dev("/dev/root", ROOT_DEV);
|
|
|
Back to top |
|
|
Chiitoo Administrator
Joined: 28 Feb 2010 Posts: 2575 Location: Here and Away Again
|
Posted: Mon Apr 25, 2016 5:37 pm Post subject: |
|
|
Merged 7 posts before the one above this one, as the topic seems to be about the same issue (and as was requested by Ant P.). _________________ Kindest of regardses. |
|
Back to top |
|
|
|