[SOLVED] <Confused> Names for my /dev/sd* devices keep changing automatically at reboot
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
<Confused> Names for my /dev/sd* devices keep changing automatically at reboot
I'm running RedHat 6.7 on VirtualBox. After adding an additonal hard drive via the VirtualBox Settings and rebooting my virtual server, I find that my sd* devices have been renamed.
For example, before adding the hard drive, my main filesystem is named sda1, sda2, and so on. But once I add a hard drive, my main filesystem will be named sdb1, sdb2 and the added hard drive assumes the sda name. It's very confusing to me.
I added the hard drive under "Controller: SCSI". I'm sorry - I'm a newbie to Linux so forgive me if I am not using the right terms for what I am describing. I appreciate your help.
Yup. They will. Same thing happens if you plug in USB devices...
The problem is caused by Linux scanning all controllers in parallel. Since it is done in parallel, it now depends on what drive spins up first. With two identical drives, one OR the other can come up first (it also can change depending on which controller is pinged first - add a new controller, expect a new order).
This is why filesystems are mounted either buy using the UUID, or the volume name assigned to the filesystem. Personally, I like volume name, as then I can say "mount volume=backup /mnt" and it always finds the right one.
You can find the UUID or assigned volume names using BLKID.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.