Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-Nov-2009, 10:17 PM
Junior Member
 
Join Date: Jun 2008
Posts: 28
cjcox 0 reputation points
Default Re: autofs and udev clash

bkelsen wrote:
> Running sles11 and have 2 x RD1000 devices (/dev/sdb and /dev/sdc)
>
> When inserting the removable disks they are detected just fine with
> "fdisk -l" and each disk mounts consistently to the same device (sdb is
> the top drive and sdc is the bottom drive).
>
> I have setup autofs so my partion on the sdc devices always is mounted
> into /media/disk and my partion on the sdb devices is always mounted
> into /media/disk-1
>
> Using autofs makes shure that when a process is accessing either
> /media/disk or /media/disk-1, the physical device is mounted (if it
> wasn't allready)
>
> WORKS LIKE A CHARM :-)
>
> However when I'm logged onto the server and no disks are inserted, then
> when I insert the first disk it ALWAYS mounts to /media/disk and the
> second one mounts to /media/disk-1.
> And this happens consistently no matter which RD1000 drive slot I
> insert into first - which is not consistent with my autofs setup !!
>
> What I need is to use only autofs, and NOT have the disks automounted
> incorrectly (or as it is, on a first come first serve basis).
>
> OR as an alternative be able to configure the automount feature to not
> use first = disk and second = disk-1, but let me control it like I do
> with autofs.
>
> I dont know if this a udev issue, and I certainly need pointers on how
> to configure this - any help appreciated.....


I'm going to assume you're connection via USB (?). But no matter...

The problem with some devices is that there is no way to read through
to a distinguishing characteristic upon which a unique static
udev path can be built.

However, if this IS possible, you can write a specific udev rule
and assign your own device name (or symlink, or whatever) and use
that in your mount.

I started writing an article and never finished it here:
http://www.ntlug.org/Articles/Hotplug

I decided to go ahead and open it up.. though it is woefully incomplete
and probably has lots of errors... but it might give you some
hints as to where to go...

However, if you do have a device that cannot present a unique
distinguishing characteristic, then one alternative is to use
filesystem labeling. This attribute can be tuned using e2fstools
or whatever filesystem utilities you might have as long as
the filesystem supports labeling. Then the mount can use
LABEL=whatever to find the right filesytem to mount.

Hope that helps (sorry I never finished the article).
Chris
Reply With Quote
 

Tags
autofs, mount, removable disk, udev

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 02:11 PM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2