Sample Header Ad - 728x90

bcache on btrfs - drives won't stay statically mapped - order changes automatically

1 vote
0 answers
479 views
Just an upfront, I've been in IT professionally for 30 years, yet mostly on the Windows systems side of the house. I've taken quite an interest in Linux as of late to expand my horizons, yet this may be somewhat of a newb question. I have searched extensively and haven't found an answer. I am working on a media server running on Ubuntu 20.04 (workstation stripped of all X). Everything is up-to-date, software-wise. My plan is to run btrfs on top of bcache with MergerFS and SnapRAID for my media server. I've been following the Perfect Media Server blog as well as https://wiki.selfhosted.show/tools/snapraid-btrfs/ . The only difference is that they don't use bcache in their configs. My bcache is set up with 17 backing devices and an MD RAID-10 NVMe array with 4 devices. The problem I'm encountering is that the system seems to mount the volumes with the bcache backing devices moved to random locations. For example, /dev/bcache5 may start up mapped to /dev/sda on one boot and on the next it's /dev/sdf, or some other random location. I've tried many fstab configurations (UUID, disk label, etc.) and it makes no difference whatsoever. I'm unsure as to if this is the fault of bcache or btrfs or something else, yet I'm at the end of my knowledge and feel as if I'm just spinning my wheels now. Other partitions (/, boot, /boot/efi) don't have this issue (thankfully!), however they're not using bcache or btrfs. It seems to me that there's some sort of automation here that's not working properly and should probably be disabled, yet I'm unsure as to what to adjust. Note, I am yet to get to the SnapRAID install, yet if I manually perform my mounts and don't reboot I am getting great performance out of the setup and MergerFS works exactly as expected, so it seems to only be a problem that occurs at boot. Thanks in advance for the assistance!
Asked by sirebral (11 rep)
Oct 22, 2021, 02:48 PM