SCIENTIFIC-LINUX-USERS Archives

February 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Eve V. E. Kovacs" <[log in to unmask]>
Reply To:
Eve V. E. Kovacs
Date:
Fri, 23 Feb 2007 10:40:37 -0600
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (72 lines)
Hi Troy,
Thaknks, but it is not quite working like you said. I have an ext3 file 
system on the 3 partitions on this drive, and they are labelled (using 
tune2fs). When I tried the hotplug test, the system did NOT use my labels 
for the partitions. Instead it used usbdisk, usbdisk1 usbdisk2.
Eve

On Fri, 23 Feb 2007, Troy Dawson wrote:

> Date: Fri, 23 Feb 2007 08:25:53 -0600
> From: Troy Dawson <[log in to unmask]>
> To: Eve V. E. Kovacs <[log in to unmask]>
> Cc: [log in to unmask]
> Subject: Re: automount usb drives
> 
> Eve V. E. Kovacs wrote:
>> Hi, I have a USB drive that I would like to automount at boot and
>> whenever it is hotplugged (is this possible?), at a fixed mountpoint.
>> 
>> The current options in the fstab (added by the system when I plugged
>> in the drive) are:
>> pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed
>> 
>> Is it just as simple as changing the noauto to auto??
>> 
>> Another behavior I would like to change is that if I hot unplug the drive 
>> and then hotplug it, the system comments out
>> my fstab entries and writes in new ones (as above) with the mountpoints
>> at /media/usbdisk1, /media/usbdisk2 etc.
>> 
>> How do I keep the mountpoints that I defined? There is a 'hotplug' mount 
>> option in Suse linux, but I could not find documentation for it in SL (not 
>> conclusive since there is no documentation I could find for 
>> fscontext=system_u object_r removable_t either!)
>> 
>> Can anyone help?
>> Thanks,
>> Eve
>> 
>> 
>
> Hi Eve,
> The easiest way I can think of is to label the file system on your USB drive 
> filesystem, and remove all mention of it from your fstab.
> That might sound a little bizzare, but here is the reason why.
> You're USB drive is already being automounted when you plug it in, you are 
> seeing it yourself.  It get's put into the fstab automatically with hotplug. 
> But, as you said, it is picking a new directory for it to be mounted in each 
> time.
> The formula that hotplug is using to pick a directory name is rather simple. 
> It's first choice is /media/<FILESYTEM LABEL>
> If a file system is not labeled, it then takes guesses, the most common being 
> usbdrive, so you get /media/usbdrive
>
> If your usbdrive patition has an ext2/ext3 partition, use e2label to label 
> it.
>
> Troy
>

-- 
***************************************************************
Eve Kovacs
Argonne National Laboratory,
Room F149, Bldg. 362, HEP
9700 S. Cass Ave.
Argonne, IL 60439 USA
Phone: (630)-252-6208
Fax:   (630)-252-5047
email: [log in to unmask]
***************************************************************

ATOM RSS1 RSS2