Score:0

Why do mount points sometimes changed?

in flag

I have two SAN devices /dev/sda and /dev/sdb;

Disk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors
Disk model: Virtual disk    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4D63EAE4-196D-4EF2-BACA-2141E63DB0F6

Disk /dev/sdb: 1000 GiB, 1073741824000 bytes, 2097152000 sectors
Disk model: Virtual disk    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

But sometimes /dev/sda is mounted into /dev/sdb after reboot. How can I prevent it from being changed?

Normal

/dev/sda2  ext4  976M  203M  707M  23% /boot
/dev/sdb   ext4  984G  9.9G  924G   2% /workspace

Abnormal

/dev/sdb2  ext4  976M  203M  707M  23% /boot

And here is the /etc/fstab

/dev/disk/by-id/dm-uuid-LVM-K680yYzEVuI9918TZkE1xLA9ArCLzJlDiU7cnVQoJxhLQcn5D4e8Xu05Vs4CWt4P / ext4 defaults 0 0
/dev/disk/by-uuid/a1b97ff4-3862-4c49-8b65-8618dd32f1ff /boot ext4 defaults 0 0
/swap.img       none    swap    sw      0       0
/dev/sdb /workspace ext4 defaults 0 0
in flag
The devices are given letter designations based on the order they report themselves to the OS. Sometimes one may be 0.0001ms faster than the other and result in an assignment mixup. It’s generally better to use the UUID whenever possible
Tilman avatar
cn flag
That should be an answer, not a comment.
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.