[Bug 727383] New: btrfs raid1: not possible to boot with multi drive btrfs setup for root partition
https://bugzilla.novell.com/show_bug.cgi?id=727383 https://bugzilla.novell.com/show_bug.cgi?id=727383#c0 Summary: btrfs raid1: not possible to boot with multi drive btrfs setup for root partition Classification: openSUSE Product: openSUSE 12.1 Version: RC 1 Platform: x86 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: rriemann@physik.hu-berlin.de QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Hi all, before installing opensuse 12.1 RC1 I created a special btrfs partition: mkfs.brtfs -d raid1 -m raid1 /dev/sda2 /dev/sdb2 Installation went well, but the first boot doesn't work. error reported by dmesg: btrfs: faild to read the system array on sda2 btrfs: open_ctree failed This error might be related to this discussion: http://ubuntuforums.org/showthread.php?t=1456494 Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c1
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c2
Robert Riemann
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c3
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c5
--- Comment #5 from Robert Riemann
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c6
Arvin Schnell
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c7
--- Comment #7 from Robert Riemann
I cannot see why this should be a problem of the YaST partitioner. The Ubuntu forum indicates a missing crc32 module in the initrd.
Correctly. I also consider this to be not a problem of YaST. Maybe the bug needs to be moved to another category. Does initrd of opensuse currently integrate a cr32 module? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c8
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c9
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c
David Sterba
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c10
--- Comment #10 from David Sterba
btrfs: faild to read the system array on sda2 btrfs: open_ctree failed
means that there is a multidevice filesystem but the kernel module is not aware of all the devices (besides the one given to mount). Solution 1: run 'btrfs device scan' before the mount; this will scan all devices formated with btrfs filesystem Solution 2: explicitly name all the devices in mount options like: "mount -o device=/dev/sda1,device=/dev/sdb1,device=...,otheroptions /dev S1 is probably the best option as it's generic and you will not end up with unbootable system after you add a new device but do not add it to the mount option list (as would happen in S2 case). Documentation note: specifying a device just means that the kernel module will scan it and add it to it's internal list of known btrfs devices, but only devices belong to the mounted device (ie. the one holding the superblock and FSID) will be tied togather and mounted. IOW, adding any existing btrfs device will do no harm. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c11
--- Comment #11 from David Sterba
I have updated btrfsprogs in factory which will provide the '/sbin/btrfs' command from inside the initrd if the root filesystem is btrfs.
However that's only first part, the 'btrfs dev scan' command has to be called at some point in time. The easy case is if the root filesystem is btrfs, this is detected by mkinitrd when run, but if not and there are multidevice partitions (like /home) the mount may fail. This would have to be detected at the 'mkinitrd' time or, ADDITIONAL_FEATURES would have to be cpecified in /etc/sysconfig/initrd file. There may be more options how to let mkinitrd be btrfs-aware. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c12
J Powell
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c13
--- Comment #13 from David Sterba
I am probably duplicating the btfsprogs work, but wanted to document a solution for 12.1 Final.
I resolved this with my 12.1 install by creating the following script as /lib/mkinitrd/scripts/boot-btrfs.sh and re-running mkinitrd.
The support for multiple devices was incomplete, I'll add the code snippet from boot-btrfs.sh you suggest. This fixes the 'scan' problem from comment 11, the rest is still valid. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c
Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c14
--- Comment #14 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c15
David Sterba
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c17
--- Comment #17 from David Sterba
(In reply to comment #13)
I'll add the code snippet from boot-btrfs.sh you suggest. This fixes the 'scan' problem from comment 11, the rest is still valid.
Thank you guys. In my case, the only remaining problem was to rerun mkinitrd!
I am using OpenSuse 12.1. To my surprise, I actually have /lib/mkinitrd/scripts/boot-btrfs.sh, which is a slightly elaborated variant of that from comment 12.
I guess I got the script in an update; in that case it would be very helpful if the update would also rerun mkinitrd!
Update of kernel will run mkinitrd, and your initrd will be enhanced with the boot-btrfs.sh script. Rerunning mkinitrd after its update makes sense to me, though I don't know if it happens.
That would have saved me from an unpleasant boot failure and a lot of research.
I'm sorry about that and understand it. I've experienced a failed boot due to missing 'dev scan' and there's unfortunately no easy way out of it, the initrd shell environment is limited and tedious to do any "advanced" tasks like editing fstab or redoing the initrd on the boot partition. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c18
--- Comment #18 from David Sterba
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c19
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c20
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c
Swamp Workflow Management
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c21
David Sterba
https://bugzilla.novell.com/show_bug.cgi?id=727383
https://bugzilla.novell.com/show_bug.cgi?id=727383#c22
--- Comment #22 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com