Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-17-2010, 04:06 PM   #1
LQ Newbie
Registered: Sep 2003
Posts: 28

Rep: Reputation: 0
Mounting a drive to a specific /dev/sd?

I have several HDDs connected to my box.
Is there a way to always get them to map to the same /dev/sda..
For example
HD1 is connected to SATA port1 on my motherboard
HD2 is connected to SATA port2 on my motherboard
... all the way to HD5 connected to Sata port5 on the motherboard

I would like port1 to always map to /dev/sda
port2 -> /dev/sdb
port3 -> /dev/sdc
etc until port5 -> /dev/sde

as of right now every time I reboot I get different mappings
like port1 -> /dev/sdc
port2 -> /dev/sda

next reboot I get different mappings again.

Old 10-17-2010, 04:38 PM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615

Better idea: use UUIDs in your fstab.
Old 10-17-2010, 04:56 PM   #3
LQ Newbie
Registered: Sep 2003
Posts: 28

Original Poster
Rep: Reputation: 0
a couple of the drives are encrypted using truecrypt
I have to keep hunting for the ones I want mounted.

all the drives are the same size so I cant use the size to determine which drive I wanted until I actually mount the drice

Old 10-17-2010, 05:35 PM   #4
Senior Member
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 2,702

Rep: Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101Reputation: 1101
mounting a drive to /dev/sdb...

I know of no way to 'lock' the device names down under current versions of udev. The solution I have found is to 'LABEL' my partitions and drives and address them in grub, fstab, and elsewhere by the label where possible. I am unfamilier with truecrypt, so I am not sure this applies, but you should be using labels or UUID where possible. Device mappings for many kinds of drives in multiple drive configurations have become dynamic and not easily predictable, but labels and UUID are dependable.


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
USB pen drive not mounting. /dev/sda1 not present! hamish Linux - Hardware 9 01-11-2010 08:25 PM
Automaticly mounting a USB flash drive to a specific directory n0wiq Linux - General 2 09-17-2009 12:26 PM
USB drive... /dev/sda1 doesn't show unless I try mounting /dev/sda as vfat finite Linux - Hardware 8 03-10-2009 12:52 AM
Force USB drive to specific /dev/sd? without udev cb8100 Linux - Hardware 1 01-17-2007 05:51 PM
Help mounting USB flash drive ... When plugged in I dont have /dev/sda1 device ... ebenh Ubuntu 2 09-17-2006 09:55 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:56 PM.

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