View previous topic :: View next topic |
Author |
Message |
QuantumFoam Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Jun 2003 Posts: 100 Location: San Clemente, CA
|
Posted: Fri Apr 04, 2008 11:49 pm Post subject: USB Drives Not Consistently Assigned in /dev |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
jstead1 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_farnsworth_2.gif)
Joined: 01 Aug 2003 Posts: 427 Location: Oswego, NY where the snow is deep
|
Posted: Fri Apr 04, 2008 11:57 pm Post subject: |
|
|
try typing
mount drive udev script
into google.
lots of examples _________________ jim |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wjb l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/175948696043ebbca04cf98.png)
Joined: 10 Jul 2005 Posts: 644 Location: Fife, Scotland
|
Posted: Sat Apr 05, 2008 11:11 am Post subject: |
|
|
Also, there are device specific names which get created in subdirectories of /dev/disk
The names are quite long, but they're ok for fstab. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Sat Apr 05, 2008 1:52 pm Post subject: |
|
|
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
The names are quite long, but they're ok for fstab. |
They're not trustworthy with USB devices. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wjb l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/175948696043ebbca04cf98.png)
Joined: 10 Jul 2005 Posts: 644 Location: Fife, Scotland
|
Posted: Mon Apr 07, 2008 6:08 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon Apr 07, 2008 8:36 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
wjb l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/175948696043ebbca04cf98.png)
Joined: 10 Jul 2005 Posts: 644 Location: Fife, Scotland
|
Posted: Mon Apr 07, 2008 9:37 pm Post subject: |
|
|
@Monkey: So do you reckon its udev or the manufacturer who's got it wrong? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Monkeh Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/158504026146c5220a4feda.png)
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon Apr 07, 2008 11:57 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|