Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several block volumes in /dev like /dev/sds. These block volumes are located on a SAN device. Every time I restart my Ubuntu server, the device names change.

I was wondering if there is any way to fix the device names (e.g. "sds") for these devices ?

share|improve this question
up vote 1 down vote accepted

There is a built in solution. Use the /dev/disk/by-id link, for example -

$ ls -l /dev/disk/by-id | grep sda
lrwxrwxrwx 1 root root  9 Mar 11 21:56 ata-ST95005620AS_5YX07EY0 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 11 21:56 ata-ST95005620AS_5YX07EY0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 11 21:56 ata-ST95005620AS_5YX07EY0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 11 21:56 ata-ST95005620AS_5YX07EY0-part5 -> ../../sda5

That output means /dev/disk/by-id/ata-ST95005620AS_5YX07EY0 will always be the drive that is currently "/dev/sda".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.