LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   3 Harddisk USB (autofs) (https://www.linuxquestions.org/questions/linux-hardware-18/3-harddisk-usb-autofs-78296/)

MrAhmad 08-02-2003 08:24 AM

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

michaelk 08-02-2003 02:00 PM

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.

MrAhmad 08-03-2003 03:44 PM

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 ?

michaelk 08-03-2003 09:54 PM

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/


All times are GMT -5. The time now is 04:16 PM.