Bug#964906: This is still an issue in 11.2

2022-04-16 Thread Kormvel Akos
There is an easy solution, put rootdelay=5 into the cmdline.txt, this makes 
init wait before mounting rootfs for 5 seconds and btrfs raid1 starts up with 
on usb without any issue.



Bug#964906: This is still an issue in 11.2

2022-02-25 Thread Matthijs van Duin
I ran into this same problem. The workarounds suggested here seemed
really hacky so I tried to dig a bit deeper for a proper solution...

I found the "btrfs device ready $DEV" command which is equivalent to
"btrfs device scan $DEV" except it only has exit code 0 if all devices
that are part of the same filesystem are known to the kernel, implying
it is ready to be mounted. Note that contrary to what the btrfs-device
manpage and "btrfs device --help" say it does not actually wait for
this condition, it merely checks and exits.

I also found that udev has a "btrfs ready" builtin which is used by
/lib/udev/rules.d/64-btrfs.rules to set the ID_BTRFS_READY property
based on this same criterion, and it also sets SYSTEMD_READY=0 until
the filesystem is ready, which causes systemd to pretend the device
doesn't exist yet.

I tried testing the ID_BTRFS_READY property in an initramfs script but
for some reason it doesn't seem to get set, even though udev should be
running if I understand correctly. I didn't get around to try using
"btrfs device ready" since I found a much easier workaround:

apt-get install dracut
apt-get purge initramfs-tools-core

Matthijs van Duin



Bug#964906: This is still an issue in 11.2

2022-01-26 Thread Jason Michaelson
After two years i did a dist-upgrade on one particular system and this is
still an issue. I have to wonder why it got moved to btrfs-progs. This
really seems like a sequencing matter because all of the btrfs devices
aren't found before the system attempts to mount /. That makes me think
that it is an issue with initamfs-tools, especially since those of us who
have submitted potential fixes for it in this bug did so against initramfs
scripts.

I'm glad I had my script changes elsewhere and could migrate them from one
system to another when i encountered this problem. It would just be nice to
have it incorporated at the source.