Device names suddenly changed

sofasurfer

Active Member
Joined
May 24, 2022
Messages
345
Reaction score
121
Credits
3,041
My device names have been very stable since I installed Debian which I was very pleased about. All of a sudden tonight I checked and two out of my four ssd drives have swapped assignments.
I have heard that drives switch assignments usually when they have been unplugged and reconnected, however I did not unplug these drives. But I do mount and unmount them frequently. Could the mount/unmount actions cause the old switcharoo?

Here is old way they usually are...
Code:
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 223.6G  0 disk 
├─sda1   8:1    0 212.2G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0  11.4G  0 part [SWAP]
sdb      8:16   0 931.5G  0 disk 
├─sdb1   8:17   0 603.6G  0 part /media/daryl/SNAPSHOTSUBUNTU
└─sdb2   8:18   0 327.9G  0 part /media/daryl/SNAPSHOTSEXPERIM
sdc      8:32   0 223.6G  0 disk 
├─sdc1   8:33   0 144.9G  0 part /media/daryl/TIMESHIFTUBUNTU
└─sdc2   8:34   0  78.7G  0 part /media/daryl/TIMESHIFTEXPERIM
sdd      8:48   0 931.5G  0 disk 
├─sdd1   8:49   0     1M  0 part 
└─sdd2   8:50   0 931.5G  0 part /media/daryl/Ubuntu-24.04-ct

And here is the way they are now...
Code:
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 223.6G  0 disk 
├─sda1   8:1    0 212.2G  0 part /
├─sda2   8:2    0     1K  0 part 
└─sda5   8:5    0  11.4G  0 part [SWAP]
sdb      8:16   0 223.6G  0 disk 
├─sdb1   8:17   0 144.9G  0 part /media/daryl/TIMESHIFTUBUNTU
└─sdb2   8:18   0  78.7G  0 part /media/daryl/TIMESHIFTEXPERIM
sdc      8:32   0 931.5G  0 disk 
├─sdc1   8:33   0     1M  0 part 
└─sdc2   8:34   0 931.5G  0 part /media/daryl/Ubuntu-24.04-ct
sdd      8:48   0 931.5G  0 disk 
├─sdd1   8:49   0 603.6G  0 part /media/daryl/SNAPSHOTSUBUNTU
└─sdd2   8:50   0 327.9G  0 part /media/daryl/SNAPSHOTSEXPERIM
 


P.S.
I just learned that you do not need to insert an attachment between the code//code tags. You can just copy and paste your text in there. Hmmm. Very interesting.
 
My device names have been very stable since I installed Debian which I was very pleased about. All of a sudden tonight I checked and two out of my four ssd drives have swapped assignments.
I have heard that drives switch assignments usually when they have been unplugged and reconnected, however I did not unplug these drives. But I do mount and unmount them frequently. Could the mount/unmount actions cause the old switcharoo?
It might be worth having another look at an earlier thread of yours here: https://linux.org/threads/how-do-i-control-dev-names.58032, where there's some explanatory detail about the changing of device names.

Device name changes are not about mounting, rather device node names like /dev/sda, /dev/sdb, etc. are not guaranteed to be stable, because they depend on detection order and driver enumeration timing. When there's parallel processing, there's no guarantee as to which of the parallel processes will come first or second or in another position.
 
Last edited:


Follow Linux.org

Members online


Top