The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Debian
.
google unix.com



Debian Debian GNU/Linux is a free distribution of the GNU/Linux operating system.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find a path of a specific file samir_standing Shell Programming and Scripting 11 10-29-2008 06:19 PM
problem with automount in Aix sriram.s AIX 6 05-03-2007 02:13 AM
AutoMount janavenki UNIX for Advanced & Expert Users 7 09-13-2004 07:16 AM
Automount hassan2 UNIX for Advanced & Expert Users 1 05-19-2004 04:12 PM
automount hassan2 UNIX for Advanced & Expert Users 4 10-31-2002 11:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-17-2008
Registered User
 

Join Date: Mar 2008
Posts: 28
automount specific USB-disk to specified path

I was just talking to a friend of mine about a problem I have, and he suggested that udev could probably help me. Allthough he couldn't give me any hints on how to accomplish what i want to.

I have read the manual and searched google, but without any good info... here's the thing...

I am running Debian Etch, and have 3 USB disks.
I would like to give them "names" in order to correctly automount them to some specific path.

For simplicity, lets call the Seagate, Maxtor and Samsung.
I would like to allways mount them into /share/USB/Seagate, /share/USB/Maxtor and /share/USB/Samsung
The problem is just that they never have the same devicename. Seagate can at one time be sda1, and the next sdc1.

How can I make it so that no matter what devicename the disks got, the Seagate disks allways automounts in /share/USB/Seagate and so on?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-18-2008
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,464
I have these udev rules for an IDE-to-USB device:
Code:
# /etc/udev/rules.d/10-local.rules
# The raw device
SYSFS{product}=="Cypress AT2LP Demo RC17", SYSFS{serial}=="000000000000", KERNEL=="sd?", NAME="%k", SYMLINK+="hotswap-bay"
# Its partitions
SYSFS{product}=="Cypress AT2LP Demo RC17", SYSFS{serial}=="000000000000", KERNEL=="sd?*", NAME="%k", SYMLINK+="hotswap-bay%n"
It generates the symlinks /dev/hotswap-bay1, /dev/hotswap-bay2, etc. when the device is detected. You may wish to forgo the symlinks and just make the device itself named that instead of whatever the kernel gives it, i.e. %k.

Note that debian probably keeps its local rules in a slightly different filename, though it does apparently have /etc/udev/rules.d

This page from the debian wiki shows you how to obtain the parameters to identify the device with.
Reply With Quote
  #3 (permalink)  
Old 11-18-2008
Registered User
 

Join Date: Mar 2008
Posts: 28
I got some help from a colleague of mine today with the problem. The answer was e2label. =)
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 09:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66