LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-19-2015, 07:26 PM   #1
nwunye
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
Unhappy <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.
 
Old 10-19-2015, 07:38 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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.
 
1 members found this post helpful.
Old 10-19-2015, 08:35 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
This is an excellent tutorial for using UUIDs in /etc/fstab; it's the one that helped me figure it out.

http://www.cyberciti.biz/faq/linux-f...-update-fstab/
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Randomly changing block device names for external devices Pinonoir Linux - General 3 04-07-2015 09:23 AM
/dev/sd* devices change their names on each virtual machine reboot ciforbg Linux - Virtualization and Cloud 7 01-03-2013 01:44 AM
What creates /dev/pts, /dev/loopx, and other /dev devices - Fedora Core 2 rickpo12 Linux - General 5 02-11-2012 08:50 PM
Changing disks and /dev devices what will happen? mshort Linux - General 1 10-14-2008 02:03 PM
internal disk /dev names keep changing! aemee Linux - Enterprise 3 04-04-2005 08:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration