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:
Troy Dawson <[log in to unmask]>
Reply To:
Troy Dawson <[log in to unmask]>
Date:
Fri, 23 Feb 2007 16:40:25 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (89 lines)
Well, I was wrong.
I have double checked, and it seems that this hotplug function *only* 
works on a DOS filesystem, not an ext3 filesysem.
So, hopefully someone knows how to tweek hotplug to look at the ext3 
file system labels.

Troy

Troy Dawson wrote:
> Hi Eve,
> I sorta thought someone would have replied to this by now.
> I'm not totally sure.  Everytime I try to tweak with hotplug I only end 
> up messing it up, so I'm out of suggestions.
> 
> You've double checked that the label is there?
> 
> Troy
> 
> Eve V. E. Kovacs wrote:
>> 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
>>>
>>
> 
> 


-- 
__________________________________________________
Troy Dawson  [log in to unmask]  (630)840-6468
Fermilab  ComputingDivision/LCSI/CSI DSS Group
__________________________________________________

ATOM RSS1 RSS2