This discussion is archived
5 Replies Latest reply: Nov 11, 2012 2:25 PM by jwmitchell RSS

OL63 kernel panic after setting up btrfs with raid0

jwmitchell Newbie
Currently Being Moderated
I've setup two physical drives to operate in raid0 mode managed by btrfs. After the initial reboot, I get the following error:

mount: wrong fs type, bad option, bad superblock on /dev/sdd2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

followed by a kernel panic.

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?
  • 1. Re: OL63 kernel panic after setting up btrfs with raid0
    Avi Miller Guru
    Currently Being Moderated
    jwmitchell wrote:
    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?
    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
  • 2. Re: OL63 kernel panic after setting up btrfs with raid0
    Dude! Guru
    Currently Being Moderated
    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?
  • 3. Re: OL63 kernel panic after setting up btrfs with raid0
    jwmitchell Newbie
    Currently Being Moderated
    Modifying /etc/fstab did not resolve issue.
  • 4. Re: OL63 kernel panic after setting up btrfs with raid0
    jwmitchell Newbie
    Currently Being Moderated
    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?
  • 5. Re: OL63 kernel panic after setting up btrfs with raid0
    Dude! Guru
    Currently Being Moderated
    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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points