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 07:19 PM
problem with automount in Aix sriram.s AIX 6 05-03-2007 03:13 AM
AutoMount janavenki UNIX for Advanced & Expert Users 7 09-13-2004 08:16 AM
Automount hassan2 UNIX for Advanced & Expert Users 1 05-19-2004 05:12 PM
automount hassan2 UNIX for Advanced & Expert Users 4 10-31-2002 12:11 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-17-2008
noratx noratx is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 30
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?
  #2 (permalink)  
Old 11-18-2008
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
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.
  #3 (permalink)  
Old 11-18-2008
noratx noratx is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 30
I got some help from a colleague of mine today with the problem. The answer was e2label. =)
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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