Unix Technical Forum

Using consistent mount points for USB & Firewire ieee1394 drives

This is a discussion on Using consistent mount points for USB & Firewire ieee1394 drives within the Linux Operating System forums, part of the Unix Operating Systems category; --> I have had 1394 and USB drives working very well for a while now under Debian Sarge with kernel ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 09:30 PM
hish
 
Posts: n/a
Default Using consistent mount points for USB & Firewire ieee1394 drives

I have had 1394 and USB drives working very well for a while now under
Debian Sarge with kernel 2.6.7. My only gripe is with the changing
mount points or rather device nodes assigned to these devices. For
example, if I boot my machine with the firewire disk plugged in, it is
assigned /dev/sdb but if I unplug it and plug it in again it then
becomes /dev/sdc or some other thing. This is a pain because now the
entry in my fstab won't load the drive.

Is there any way that I can get the system to set this device up under
the same device node each time so that it is always /dev/sdb no matter
how many times I plug and unplug it?
Thanks,
Hish
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 09:30 PM
Paul Lutus
 
Posts: n/a
Default Re: Using consistent mount points for USB & Firewire ieee1394 drives

hish wrote:

> I have had 1394 and USB drives working very well for a while now under
> Debian Sarge with kernel 2.6.7. My only gripe is with the changing
> mount points or rather device nodes assigned to these devices. For
> example, if I boot my machine with the firewire disk plugged in, it is
> assigned /dev/sdb but if I unplug it and plug it in again it then
> becomes /dev/sdc or some other thing. This is a pain because now the
> entry in my fstab won't load the drive.
>
> Is there any way that I can get the system to set this device up under
> the same device node each time so that it is always /dev/sdb no matter
> how many times I plug and unplug it?


Sure. Don't ever plug in any other peripheral that might monopolize this
device.

Alternative: write a shell script that figures out which device got the
mapping for the hardware, and creates a symlink with a specific name that
doesn't change.

--
Paul Lutus
http://www.arachnoid.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-17-2008, 09:30 PM
Markku Kolkka
 
Posts: n/a
Default Re: Using consistent mount points for USB & Firewire ieee1394 drives

hish wrote:
> Is there any way that I can get the system to set this device up under
> the same device node each time so that it is always /dev/sdb no matter
> how many times I plug and unplug it?


Yes, the solution is called "udev":
http://www.linuxjournal.com/article.php?sid=7316
http://www.kernel.org/pub/linux/util...tplug/udev-FAQ
http://webpages.charter.net/decibels...DEVPrimer.html
http://www.reactivated.net/udevrules.php

--
Markku Kolkka
markku.kolkka@iki.fi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-17-2008, 09:30 PM
Abdullah Ramazanoglu
 
Posts: n/a
Default Re: Using consistent mount points for USB & Firewire ieee1394 drives

begin hish@myself.com (hish) dedi ki:

> I have had 1394 and USB drives working very well for a while now under
> Debian Sarge with kernel 2.6.7. My only gripe is with the changing
> mount points or rather device nodes assigned to these devices. For
> example, if I boot my machine with the firewire disk plugged in, it is
> assigned /dev/sdb but if I unplug it and plug it in again it then
> becomes /dev/sdc or some other thing. This is a pain because now the
> entry in my fstab won't load the drive.


You can mount your USB volumes based on volume-label instead of device
name. E.g:

As root issue:
# e2label /dev/sdc1 USBPART1

and then in /etc/fstab:
LABEL=USBPART1 /mnt/myusb1 ext3 defaults 1 2

so the first partition on the USB drive will always mount as /mnt/myusb1
regardless of which device it is on.

> Is there any way that I can get the system to set this device up under
> the same device node each time so that it is always /dev/sdb no matter
> how many times I plug and unplug it?


Alternatively you can get your USB device recognized consistently, as
explained in other posts.

--
Abdullah | aramazan@ |
Ramazanoglu | myrealbox |
________________| D.0.T cöm |__

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com