Bug 130855 - Hotplug usb-storage call updfstab before module recognize hardware
Summary: Hotplug usb-storage call updfstab before module recognize hardware
Keywords:
Status: CLOSED DUPLICATE of bug 119140
Alias: None
Product: Fedora
Classification: Fedora
Component: hotplug
Version: 2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-25 10:42 UTC by Michele Castigliego
Modified: 2014-03-17 02:47 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:05:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michele Castigliego 2004-08-25 10:42:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.2)
Gecko/20040803

Description of problem:
Hardware: Freecom USB HD 20GB

When inserting USB HD, hotplug load modules scsi_mod and usb_storage.
If I remove USB disk these modules are remaining loaded, not so bad...
But if I plug again USB HD the function load_drivers call updfstab
just a second before the modules are binding to device so updfstab
can't see new hardware.

I've edited just on line in hotplug.functions:

...
if echo "$MODULE" | grep -q "usb-storage" > /dev/null 2>&1 ; then
    [ -x /usr/sbin/updfstab ] &&  /usr/sbin/updfstab
fi
...

in

...
if echo "$MODULE" | grep -q "usb-storage" > /dev/null 2>&1 ; then
    sleep 3 && [ -x /usr/sbin/updfstab ] &&  /usr/sbin/updfstab
fi
...

so updfstab wait some seconds before update fstab.


I don't know if this problem remain with other devices but I think yes.


Version-Release number of selected component (if applicable):
hotplug-2004_04_01-1

How reproducible:
Always

Steps to Reproduce:
1.Plug USB storage
2.Unplug USB storage
3.Plug again USB storage
    

Actual Results:  The second time I plug the device fstab isn't updated.

Expected Results:  Every time I plug or unplug a device fstab should
be updated.

Additional info:

I've added in /etc/updfstab an entry to match my device:

...
match   hd "DK14FA-20"
...

Comment 1 Ben Brown 2004-09-10 18:39:06 UTC
I have two USB flash drives, one from Dell, and one from Lexar. Both
exhibit the same behavior. I didn't have to edit /etc/updfstab to get
them to work. I didn't realize that updfstab was running before the
existing modules could bind to the device, but instead ran 'rmmod
usb-storage' and noticed that 'updfstab' worked fine after that.

The fix posted here works fine for me.

Comment 2 Jason Tibbitts 2005-01-25 15:24:58 UTC
I'm seeing this problem all across my network and it's really causing problems
as users expect to use these things.  I know everything used to work so I'm
concerned that some more recent update broke something.  Updates are mirrored
and applied nightly and I don't recall seeing this problem until December, which
is odd given the age of this report.

On my regular desktop machine, three seconds of sleeping doesn't seem to be
sufficient; seven seems to be the minimum.  

I'll try stepping back through all of the updates to see if I can pinpoint the
source of this issue.  Any suggestions would be appreciated.


Comment 3 Jason Tibbitts 2005-01-25 15:27:28 UTC
BTW, this is probably a dup of bug 119140, although I know things were working
fine for me long after that bug was reported.  Perhaps some recent kernel update
increased the amount of time it takes to recognize the devices?

Comment 4 Bill Nottingham 2005-02-04 21:08:45 UTC

*** This bug has been marked as a duplicate of 119140 ***

Comment 5 Red Hat Bugzilla 2006-02-21 19:05:16 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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