Score:-2

How to define mount order of devices?

cn flag

(I did read read plenty on this topic here and elsewhere, however to no avail.)
I run a server with an internal SSD and an external USB data drive. At boot, the sequence of drive detection is random. Sometimes the USB pops up before the internal SDD, sometimes the other way round. Therefore at times the OS sits on /dev/sda, at other times on /dev/sdb. How do I (auto?)mount, though at least mount the USB-drive without manually checking if USB came up as sda or sdb? Device-IDs wouldn't work, since I plug in different disks of identical partition layouts. Therefore fstab contains something like /dev/sdb1 /home/myuser/media ..., which at times mounts properly at boot, at other times not.
How can I avoid random device recognition at boot?

24601 avatar
in flag
Does this answer your question? [How can I specify the order in which filesystems are automatically mounted?](https://askubuntu.com/questions/40185/how-can-i-specify-the-order-in-which-filesystems-are-automatically-mounted)
udippel avatar
cn flag
No, it doesn't. I had seen that as well, thanks. The problem is not the sequence, but the pre-allocation. Whichever drive is seen first by the kernel (dmesg), gets sda. fstab is already too late. Sometimes the OS shows as running on sda, sometimes on sdb, due to the drive-IDs without any problem. Then either sda or sdb are 'taken' for the OS. This renders it infeasible to mount the USB-drive automatically, because it could be sda or sdb.
24601 avatar
in flag
which explains why when asking a question you should first read [ask] and list what you have done or tried to save duplication of effort and avoid wasting people's time.
udippel avatar
cn flag
You are right, though I don't think anyone would want to see 20+ links that I have seen and read before posting. Therefore my first sentence, trying to indicate that obvious answers are known to me.
24601 avatar
in flag
but we are not clairvoyants...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.