Issue with HDD Order Changing in Dual-HDD JBOD Enclosure on Orange Pi 3B

Hi everyone,

I’m using an Orange Pi 3B with a dual-HDD SATA-to-USB enclosure configured in JBOD mode. The enclosure connects to the Pi via a single USB 3.0 Type-A cable. Each HDD in the enclosure is detected separately by the system, as expected. However, I’ve been facing an issue where the order of the drives frequently changes between boots or after reconnecting the enclosure.

For example:

Initially, the two drives are recognized as /dev/sda1 and /dev/sdb1.
After rebooting or reconnecting, the drives may appear as /dev/sdc1 and /dev/sdd1.
This inconsistency is causing problems with certain applications, such as Emby (running in a Docker container), which relies on consistent drive paths for shared folders.

Here are the details of my setup:

Device: Orange Pi 3B running Orange Pi OS (Armbian-based).
Enclosure: A dual-HDD JBOD enclosure with physical mode selection.
Drives: Two HDDs (1 TB and 500 GB).
Observed Behavior: Drive order changes between reboots or after disconnection.
Workaround Attempts:
Using UUIDs in /etc/fstab for stable mounts.
Creating symlinks to stable mount points.
Exploring udev rules for static naming based on serial numbers.
While these workarounds provide some stability, the frequent change in device names (e.g., from /dev/sda1 to /dev/sdc1) still complicates certain workflows.

Questions:

Is there a recommended way to enforce consistent device names for HDDs in a JBOD enclosure on Linux-based systems like Orange Pi OS?
Would modifying udev rules or adjusting BIOS/UEFI USB priorities provide a more robust solution?
Are there any best practices or tools specific to managing dual-HDD enclosures on systems with limited hardware resources?
Any insights or suggestions would be greatly appreciated. Thank you!

casaos itself does not modify or interfere with the order of the usb or hard disk, it is recommended that you check your system’s settings for the boot order of the usb and hard disk.