This content has been marked as final. Show 5 replies
jwmitchell wrote:You can just specify multiple devices in /etc/fstab instead: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Mounting_a_multi-device_filesystem_from_.2Fetc.2Ffstab
Google-ing for the error indicates that the command "btrfs device scan" should be added to the startup scripts, or the initrd images if the root filesystem is btrfs. Since the root filesystem is btrfs, how do I modify the initrd image to include this statement?
Is the device or btrfs raid setup that causes the trouble your root volume?
Assuming yes... as far as I know the root device is specified by an appropriate kernel parameter. /etc/fstab is not available until the root filesystem has been mounted. OL 6 does not use initrd, but uses dracut/initramfs instead. So I guess the question is what devices does dracut see at system startup. Is the kernel able to mount the devices in question without any additional driver?
Had some free time today so I thought I'd try setting up BTRFS with raid 1 on the root filesystem. Just as with raid 0, after rebooting I was greeted with the "wrong fs type, bad option, bad superblock ... kernel panic" message. I followed a mix of instructions from the Archlinux website, Dude, and the btrfs.kernel.org website when setting up the new volume. Everything seems fine, and the filesystem is mountable from a Fedora rescue disc - just won't boot. So - since this is supposed to be a production ready filesystem - what is the deal?
And yes, my /etc/fstab file contains the complete list of devices included in the raid 1 filesystem.
Anyone have success with raid 0 or raid 1 with a root BTRFS filesystem using OL6.3?
The boot process has no knowledge of the /etc/fstab file on our root volume, which obviously needs to be mounted first. The /etc/fstab file is not relevant for the boot process and mounting the BTRFS root volume. Actually you do not need to specify RAID members in the fstab file and can do a btrfs device scan, followed by mounting any of the RAID members. The BTRFS kernel driver allows you to mount a BTRFS filesystem, but is not sufficient to assemble the RAID.
According to my analysis, the system installed initramfs boot image does not include necessary BTRFS tools to provide multiple device support. The btrfsctl and btrfs commands are missing. You can use the "rdshell rdinitdebug" kernel parameter to drop into a shell and check it. It is apparently necessary to install the BTRFS progs package and rebuild the initramfs image using the dracut command. It might also be a good idea to replace the existing udev configuration, which relies on the obsolete btrfsctl utility.
I'm currently looking into the same issue and will try to provide a documented solution, provided it finally works.
Edited by: Dude on Nov 11, 2012 3:59 PM