Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Drives Not Consistently Assigned in /dev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
QuantumFoam
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jun 2003
Posts: 100
Location: San Clemente, CA

PostPosted: Fri Apr 04, 2008 11:49 pm    Post subject: USB Drives Not Consistently Assigned in /dev Reply with quote

Hi. I've been having a problem that's more of an annoyance than a real issue, but I was wondering if anyone could help me out. I have three USB2 disk drives, all connected in parallel through a USB2 hub, and I have them assigned (in fstab) to mount to various mountpoints in /mnt. The trouble is, my system is inconsistent in the assignment of drive to /dev node (I think node is the word to use here).

As an example, in fstab, I have a listing for /dev/sda1 to be mounted to /mnt/itchy, for /dev/sdb1 to be mounted to /mnt/scratchy, and /dev/sdc1 to be mounted to /mnt/poochy. The next time I reboot, the drive that was assigned to sda1 will be assigned to sdb1, sdc1 to sda1, and sdb1 to sdc1, and each physical drive will end up on the wrong mountpoint. There is no consistency between boots. Is there a way to assign a /dev node to a drive with a certain serial number, or is there perhaps a better solution? Thanks in advance for any insight you may provide.
Back to top
View user's profile Send private message
jstead1
Guru
Guru


Joined: 01 Aug 2003
Posts: 427
Location: Oswego, NY where the snow is deep

PostPosted: Fri Apr 04, 2008 11:57 pm    Post subject: Reply with quote

try typing
mount drive udev script
into google.
lots of examples
_________________
jim
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 644
Location: Fife, Scotland

PostPosted: Sat Apr 05, 2008 11:11 am    Post subject: Reply with quote

Also, there are device specific names which get created in subdirectories of /dev/disk

Code:
# ls -lR /dev/disk

The names are quite long, but they're ok for fstab.
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Sat Apr 05, 2008 1:52 pm    Post subject: Reply with quote

Use filesystem labels. See fstab and tune2fs man pages.

wjb wrote:
Also, there are device specific names which get created in subdirectories of /dev/disk

Code:
# ls -lR /dev/disk

The names are quite long, but they're ok for fstab.


They're not trustworthy with USB devices.
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 644
Location: Fife, Scotland

PostPosted: Mon Apr 07, 2008 6:08 pm    Post subject: Reply with quote

Just curious but why is it untrustworthy? The by-id directory picks up the manufacturer, model, and serial number the same as udevinfo gives out.
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Mon Apr 07, 2008 8:36 pm    Post subject: Reply with quote

wjb wrote:
Just curious but why is it untrustworthy? The by-id directory picks up the manufacturer, model, and serial number the same as udevinfo gives out.


Yes, and the serial number is not reliable. I have two identical drives, with different serial numbers (obviously), and udev cannot tell the difference. As such, you cannot rely on it.
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 644
Location: Fife, Scotland

PostPosted: Mon Apr 07, 2008 9:37 pm    Post subject: Reply with quote

@Monkey: So do you reckon its udev or the manufacturer who's got it wrong?
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Mon Apr 07, 2008 11:57 pm    Post subject: Reply with quote

wjb wrote:
@Monkey: So do you reckon its udev or the manufacturer who's got it wrong?


I don't know, all I know is both report the same serial number (it's fake), and udev can't handle it properly. It can't be trusted with USB devices, as far as I'm concerned. I don't trust udev much anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum