Bug 126868
Summary: | updfstab only works the first time a flash drive is installed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Roderick Johnstone <rmj> | ||||
Component: | kudzu | Assignee: | Bill Nottingham <notting> | ||||
Status: | CLOSED DUPLICATE | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2 | CC: | rasmus.back, rvokal | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-02-21 19:04:15 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Roderick Johnstone
2004-06-28 16:07:43 UTC
Any kernel messages at all related to the device? Created attachment 101533 [details]
kernel message log
Relevant section of /var/log/messages.
Note that second time the flash device is plugged in there is no corresponding
updfstab entry.
This is FC2 with 1.1.62-1? It shouldn't be generating SG warnings (this is more of a side point, though.) Yes, I can confirm this is Fedora Core 2 and kudzu-1.1.62-1. I get similar behaviour with a "universal USB card reader", and it seems to me that the problem is simply that updfstab isn't executed at all. Furthermore, I suspect that the explanation of it all is that load_drivers() in /etc/hotplug/hotplug.functions, which in turn calls updfstab, gets executed if, and only if, the module isn't there already (which it is after inserting, then removing device.) On other words, the fstab entries are correctly re-inserted after: 1.Plug in drive 2.Unplug drive 3.Plug in drive 4.# updfstab and, perhaps more intrestingly, also if I do: 1.Plug in drive 2.Unplug drive 3. # rmmod usb-storage 4.Plug in drive I stand corrected: Additional tests show that updfstab does get executed - it just somehow fails to identify the unit. I'm still quite sure that the symptoms I described are genuine, though; the device entries get added if you execute updfstab a 2nd time, or if the module wasn't loaded already. Also, I tried changing /etc/hotplug/hotplug.functions so that updfstab gets executed twice, and with that setup, I can no longer reproduce the problem. I can confirm this bug for another USB device, a 256MB thumbdrive. Stock updated FC2 system. Below is the dmesg output that follows the device being attached for the first time (updfstab correctly adds /mnt/flash), being removed (updfstab correctly removes /mnt/flash) and attached again (updfstab does not create /mnt/flash). usb 1-1.1.2: new full speed USB device using address 6 Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices Vendor: OTi Model: Flash Disk Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 02 Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0 USB Mass Storage device found at 6 usbcore: registered new driver usb-storage USB Mass Storage support registered. SCSI device sda: 516096 512-byte hdwr sectors (264 MB) sda: assuming Write Enabled sda: assuming drive cache: write through sda: sda1 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 updfstab: Using deprecated /dev/sg mechanism instead of SG_IO on the actual device usb 1-1.1.2: USB disconnect, address 6 usb 1-1.1.2: new full speed USB device using address 7 scsi1 : SCSI emulation for USB Mass Storage devices Vendor: OTi Model: Flash Disk Rev: 1.11 Type: Direct-Access ANSI SCSI revision: 02 SCSI device sda: 516096 512-byte hdwr sectors (264 MB) sda: assuming Write Enabled sda: assuming drive cache: write through sda: sda1 Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0 Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0 USB Mass Storage device found at 7 This appears timing-related to me. If I change line 170 of /etc/hotplug/hotplug.functions from: [ -x /usr/sbin/updfstab ] && /usr/sbin/updfstab to: if [ -x /usr/sbin/updfstab ]; then # HJS sleep 5 /usr/sbin/updfstab play /usr/share/sounds/pop.wav fi then it appears to work reliably, no matter how often you plug/unplug. It seems hotplug gets executed by the kernel before the SCSI subsystem has fully registered the new devices, so updfstab can't see them yet (or can't see them all yet as in my case. Out of 4 devices, only the first usually gets detected.). This would also explain the "first time OK" behaviour: First time, the usb-storage module has to be loaded first, whichw would change the timeing somehow. But all this is a rather wild guess... BTW: This was not an issue with FC1, neither with RH9. Seems it is related to kernel 2.6 Bill, I guess this is the same bug as 119140, you may want to close one of the two. *** This bug has been marked as a duplicate of 119140 *** Changed to 'CLOSED' state since 'RESOLVED' has been deprecated. |