LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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?

Notices


Reply
  Search this Thread
Old 08-02-2003, 08:24 AM   #1
MrAhmad
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
3 Harddisk USB (autofs)


Hi

I have 3 USB harddisk

I want to give each of them a static name (/mnt/disk1)

How can I do that ?

Right now the first pluged usb get the first name (/mnt/disk1 -> /dev/sda1)

But if I plug the second disj before the fist disk it will get the fist disk name (/mnt/disk 1-> /dev/sda1)


Is there any way to make a static name for each of them ?

my /etc/autofs.misc :
Code:
# $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

usb             -fstype=auto,nosuid,umask=002,uid=501,gid=501,iocharset=utf8   :/dev/sda1
backup          -fstype=auto,umask=002,uid=501,gid=501,iocharset=utf8      :/dev/sdc1
camera          -fstype=auto,iocharset=utf8,umask=002,uid=501,gid=501      :/dev/sdb1

Thank you
 
Old 08-02-2003, 02:00 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
That is a problem because the first USB device (i.e mass storage) the OS finds will be assigned /dev/sda1.

One way to solve this problem would be a script that would examine the output of cdrecord --scanbus and see how the devices are connected.
 
Old 08-03-2003, 03:44 PM   #3
MrAhmad
LQ Newbie
 
Registered: Aug 2003
Posts: 2

Original Poster
Rep: Reputation: 0
I don't care about where linux will but the usb (/dev/sd*) I care about the mount name (/mnt/*)

do you know where can I find any script for that ?
 
Old 08-03-2003, 09:54 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Mount points are arbitrary. If you always want to mount a particular drive to the same mount point you do need to know its device.

I don't use hotplug but this might be what you are looking for.
http://linux-hotplug.sourceforge.net/

Last edited by michaelk; 08-03-2003 at 09:58 PM.
 
  


Reply



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 Harddisk enemorales Linux - General 2 07-10-2005 04:10 AM
Canīt write to external USB harddisk fhjulfor Linux - Hardware 1 11-08-2004 11:33 AM
Problems mounting usb harddisk aargh Linux - Hardware 3 09-16-2004 08:59 PM
using autofs to auto mount my usb drives DesertWolf0132 Slackware 8 07-30-2004 10:27 AM
USB Harddisk For Linux? ahpin Linux - Hardware 1 05-31-2004 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:26 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
Open Source Consulting | Domain Registration