Attached devices change /dev/sd value

0

I have a script which auto mounts my Windows partition based on UUID,

reason: my attached devices change their /dev/sd value.

After booting up, my external hard drive might take on /dev/sda or /dev/sdb,

What causes these values to change?

Cybex

Posted 2016-05-29T16:29:06.417

Reputation: 825

Answers

0

/dev/sdX nodes are not supposed to be numbered always the same. They are added as and when the system "sees" them appear. If two devices take about the same time to start up, there may be a kind of race condition in the attribution of device nodes.

Your method is the good one. One may as well use label, id, or hardware path, see

ls /dev/disk/by-*

L. Levrel

Posted 2016-05-29T16:29:06.417

Reputation: 336