LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 08:26 PM   #1
nwunye
LQ Newbie
 
Registered: Oct 2015
Posts: 1

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, 08:38 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
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, 09:35 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,360
Blog Entries: 12

Rep: Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740Reputation: 2740
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 10:23 AM
/dev/sd* devices change their names on each virtual machine reboot ciforbg Linux - Virtualization and Cloud 7 01-03-2013 02:44 AM
What creates /dev/pts, /dev/loopx, and other /dev devices - Fedora Core 2 rickpo12 Linux - General 5 02-11-2012 09:50 PM
Changing disks and /dev devices what will happen? mshort Linux - General 1 10-14-2008 03:03 PM
internal disk /dev names keep changing! aemee Linux - Enterprise 3 04-04-2005 09:56 PM


All times are GMT -5. The time now is 09:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration