Bugzilla – Bug 984516
extending btrfs causes boot failure
Last modified: 2016-09-22 09:23:14 UTC
Created attachment 680656 [details] output of journalctl -b root on btrfs on lvm ( # btrfs filesystem show Label: none uuid: a4a69c17-1731-4c09-a940-83fdfb8ac4d7 Total devices 1 FS bytes used 17.17GiB devid 1 size 40.00GiB used 21.29GiB path /dev/mapper/system--nvme-root_factory ) Trying to extend that with another lvm partition with btrfs device add /dev/system-nvme/root_extent / results in : # btrfs filesystem show Label: none uuid: a4a69c17-1731-4c09-a940-83fdfb8ac4d7 Total devices 2 FS bytes used 17.17GiB devid 1 size 40.00GiB used 21.29GiB path /dev/mapper/system--nvme-root_factory devid 2 size 20.00GiB used 0.00B path /dev/mapper/system--nvme-root_extent Now rebooting the system fails with BTRFS: failed to read chunktree on dm0 BTRFS: open ctree failed. and dropping me into a initrd shell Undoing the extension with btrfs device delete from another opensuse installation makes the system booting again I'll attach the output of journalctl -b, udevadm info --export-db and rdsosreport.txt There was allready some discussion about a similar bug with 13.2 on https://forums.opensuse.org/showthread.php/518220-fun-with-extending-btrfs
Created attachment 680657 [details] output of udevadm info --export-db
Created attachment 680658 [details] rdsosreport.txt
(In reply to Markus Koßmann from comment #0) > # btrfs filesystem show > Label: none uuid: a4a69c17-1731-4c09-a940-83fdfb8ac4d7 > Total devices 2 FS bytes used 17.17GiB > devid 1 size 40.00GiB used 21.29GiB path > /dev/mapper/system--nvme-root_factory > devid 2 size 20.00GiB used 0.00B path > /dev/mapper/system--nvme-root_extent > > Now rebooting the system fails with > BTRFS: failed to read chunktree on dm0 > BTRFS: open ctree failed. > and dropping me into a initrd shell dracut configuration includes only system--nvme-root: + cat /etc/cmdline.d/90lvm.conf rd.lvm.lv=system-nvme/root_factory rd.lvm.lv=system-hd/swap Did you rebuild initrd after adding device to btrfs?
Created attachment 681075 [details] rdsosreport.txt with updated initrd
Created attachment 681076 [details] output of udevadm info --export-db withupdated initrd
Created attachment 681077 [details] output of journalctl -b with updated initrd
Thanks. What happens here is that rules in 64-btrfs.rules do not work at all, so systemd attempts to mount root as soon as the first device appears. Please, replace /usr/lib/udev/rules.d/64-btrfs.rules with attached file, rebuild initrd and test again. If you still observe this issue, please boot with rd.udev.debug and "quiet" removed from kernel command line and attach "journalctl -b" output.
Created attachment 681078 [details] Upstream btrfs rules
Upstream btrfs rules seem to fix the problem.
Thanks, I was actually a bit surprised it worked :) but I see now that mkinitrd also calls update-bootloader --refresh which explains why it was enough. Anyway, reassigning to systemd now and submitted SR to fix rules for devel project: SR#403388 @systemd-maintainers: I think we need update for all versions affected by boo#912170 as well.
(In reply to Andrei Borzenkov from comment #10) > @systemd-maintainers: I think we need update for all versions affected by > boo#912170 as well. Thanks for the info. I have submitted a request for the v210 versions.
I'm closing this bug since it should be fixed in TW. See bsc#912170 which is about openSUSE distros.
(In reply to Franck Bui from comment #12) > I'm closing this bug since it should be fixed in TW. > > See bsc#912170 which is about openSUSE distros. I meant: "which is about *other* openSUSE distros".