Austin S. Hemmelgarn posted on Wed, 20 Dec 2017 08:33:03 -0500 as excerpted:
>> The obvious answer is: do it via kernel command line, just like mdadm >> does: >> rootflags=device=/dev/sda,device=/dev/sdb >> rootflags=device=/dev/sda,device=missing >> rootflags=device=/dev/sda,device=/dev/sdb,degraded >> >> If only btrfs.ko recognized this, kernel would be able to assemble >> multivolume btrfs itself. Not only this would allow automated degraded >> mounts, it would also allow using initrd-less kernels on such volumes. > Last I checked, the 'device=' options work on upstream kernels just > fine, though I've never tried the degraded option. Of course, I'm also > not using systemd, so it may be some interaction with systemd that's > causing them to not work (and yes, I understand that I'm inclined to > blame systemd most of the time based on significant past experience with > systemd creating issues that never existed before). Has the bug where rootflags=device=/dev/sda1,device=/dev/sdb1 failed, been fixed? Last I knew (which was ancient history in btrfs terms, but I've not seen mention of a patch for it in all that time either), device= on the userspace commandline worked, and device= on the kernel commandline worked if there was just one device, but it would fail for more than one device. Mounting degraded (on a pair-device raid1) would then of course work, since it would just use the one device=, but that's simply dangerous for routine use regardless of whether it actually assembled or not, thus effectively forcing an initr* for multi-device btrfs root in ordered to get it mounted properly. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html