Bug 130855 - Hotplug usb-storage call updfstab before module recognize hardware
Hotplug usb-storage call updfstab before module recognize hardware
Status: CLOSED DUPLICATE of bug 119140
Product: Fedora
Classification: Fedora
Component: hotplug (Show other bugs)
2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-25 06:42 EDT by Michele Castigliego
Modified: 2014-03-16 22:47 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:05:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michele Castigliego 2004-08-25 06:42:51 EDT
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 14:39:06 EDT
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 10:24:58 EST
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 10:27:28 EST
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 16:08:45 EST

*** This bug has been marked as a duplicate of 119140 ***
Comment 5 Red Hat Bugzilla 2006-02-21 14:05:16 EST
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.