Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162799 - hotplug does not recognize that the usb-storage device /dev/sda1 exists
Summary: hotplug does not recognize that the usb-storage device /dev/sda1 exists
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-08 18:40 UTC by Luis A. Florit
Modified: 2013-03-13 04:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-12 04:24:07 UTC


Attachments (Terms of Use)
lshal output (deleted)
2005-12-12 01:26 UTC, Luis A. Florit
no flags Details
/etc/fstab (deleted)
2005-12-12 01:29 UTC, Luis A. Florit
no flags Details

Description Luis A. Florit 2005-07-08 18:40:52 UTC
Description of problem:
I used hotplug with FC2 to automagically mount my pen drive.
Although it is executed, the hotplug script /etc/hotplug/usb/usb-storage doesn't
work anymore, and the console shows:

mount: you must specify the filesystem type

I tried  to replace the command

mount /media/key >& /dev/console

in the script /etc/hotplug/usb/usb-storage by the command

mount -t ext3 /dev/sda1 /media/key >& /dev/console

but then the console says:

mount: special device /dev/sda1 does not exist

Of course it does, and the same both commands at the console mount the pen drive
without any error. Interestingly, unmounting when the pen drive is unplugged
while mounted works.

Version-Release number of selected component (if applicable):
FC4 fully updated, 2.6.12-1.1387_FC4, hotplug-2004_09_23-7.
Same result with the original FC4 kernel 2.6.11-1.1369.

How reproducible:
Always. Just plugging the pen drive.

Actual results:
Pen drive not mounted.

Expected results:
Pen drive mounted.

Comment 1 Bill Nottingham 2005-07-08 18:46:40 UTC
I suspect it's racing with udev which is creating the device nodes.

HAL already exists and has hooks for mounting removable storage; assigning there.

Comment 2 Luis A. Florit 2005-07-08 23:27:36 UTC
I think it is not because a 'race'.
The mount error appears after the device was created.
In addition, just in case, I added a "sleep 30 seconds" 
right before the mount command to be sure the device was
created. Same results.
L.

Comment 3 Luis A. Florit 2005-11-30 00:18:10 UTC
Are Fedora bugs being processed? 
I mean: is Fedora alive? 
L. 

Comment 4 John (J5) Palmieri 2005-11-30 02:57:30 UTC
Hotplug doesn't handle key mounting anymore.  That is done with HAL in FC4 (and
in FC5 hotplug will be removed).  Did you upgrade or do a fresh install?  Please
attach the output of the lshal command and the contents of /etc/fstab with the
key plugged in.  Thanks.

Comment 5 Luis A. Florit 2005-12-12 01:26:16 UTC
Created attachment 122115 [details]
lshal output

Comment 6 Luis A. Florit 2005-12-12 01:29:54 UTC
Created attachment 122116 [details]
/etc/fstab

Comment 7 Luis A. Florit 2005-12-12 01:32:09 UTC
I never do upgrades to versions of Fedora, only to packages. 
So, FC4 was a fresh install. 
I have had tons of problems with HAL. 

Comment 8 John (J5) Palmieri 2005-12-12 04:24:07 UTC
So hotplug doesn't work here most likely because the script is being run before
the node is created by udev.  Not really a bug since hotplug shouldn't be used
for this.  Your solutions are to let HAL and gnome-volume-manager to handle it
(gnome-volume-manager is what does the mounting) or you can write a HAL callout
to do it or just run the autofs or automounter daemon (amd) which will mount
drives in fstab when you try to access them.  BTW hardcoding /dev/sda1 /dev/sdb1
etc. could run you into some problems as you never know which device will get
which node name from kernel to kernel.

To see how HAL does things check out the fdi files in /usr/share/hal/fdi.  You
should see a storage-policy fdi file in there that adds the fstab-sync callout.
 Beyond that go to the hal website at  http://freedesktop.org/wiki/Software/hal


Note You need to log in before you can comment on or make changes to this bug.