From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Description of problem:
devlabel does not automount a usb memory stick when from from hotplug.
However, it does when run by hand (/sbin/devlabel restart).
# relevent messages from /var/log/messages
Jan 7 17:09:46 magnolia /etc/hotplug/usb.agent: Setup usb-storage for
USB product d7d/100/100
Jan 7 17:09:46 magnolia devlabel: devlabel's temporary ignore list
/etc/sysconfig/devlabel.d/ignore_list has been emptied due to a change
in device configuration.
Jan 7 17:09:46 magnolia kernel: SCSI device sda: 256000 512-byte hdwr
sectors (131 MB)
Jan 7 17:09:46 magnolia kernel: sda: Write Protect is off
Jan 7 17:09:46 magnolia kernel: sda: sda1
Jan 7 17:09:48 magnolia devlabel: devlabel service started/restarted
Jan 7 17:09:49 magnolia devlabel: The symlink /dev/memstick ->
/dev/sda1 is being ignored in /etc/sysconfig/devlabel because the
correct device cannot be found.
# relevant messages when run by hand
[root@magnolia sysconfig]# /sbin/devlabel restart
SYMLINK: /dev/memstick -> /dev/sda1
[root@magnolia sysconfig]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/memstick 126566 116732 9834 93% /mnt/memstick
# fstab entry
/dev/memstick /mnt/memstick auto noauto,owner 0 0
/dev/memstick /dev/sda1 S:IMCKanguruMicrosector32 automount
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. umount /mnt/memstick
2. remove memory stick from usb port
3. insert memory stik into usb port
4. get error in /var/log/messages
"The symlink /dev/memstick -> /dev/sda1 is being ignored in
/etc/sysconfig/devlabel because the correct device cannot be found."
5. /sbin/devlabel restart
"SYMLINK: /dev/memstick -> /dev/sda1"
6. verify device mounted (e.g., ls /mnt/memstick)
This may be a timing issue. Is it possible that hotplug is running
devlabel before the new usb device is recognized and bound to /dev/sda1?
This may also be related to bug id#102056 (devlabel needs to be run twice)
Do the fixes in bug 144241 work for you?
Thanks for the quick response. I tried the patch. Unfortunately, it
did not appear to change the behavior reported above.
*** Bug 102056 has been marked as a duplicate of this bug. ***
Yes, it seems like timing problem, but I have no idea how we can decide when we
should wait for device and when it's correct that the device doesn't exist.
I'm far from an expert on the internals of hotplug and devlabel. But it seems
that when hotplug detects the new device, it should wait until the device
(/dev/sda1 in the example above) is ready before calling devlabel to mount it.
Isn't this as simple as a loop waiting for the device to show up in the file
system? The delay between checks could be fairly long (1 second) since this is
not a time sensitive task.
This could also be done in usb.agent, but I think it better done in hotplug
since this would be a common issue across all buses.
My two bits.
I think hotplug doesn't detect any device. It calls modprobe and all depends on
kernel modules. I'm really not sure that kernel must always create
/dev/something. It depends on type of USB/PCMCIA/etc.
Add CC: to hotplug maintainer.
Realistically, it should probably be running from the SCSI hotplug event, not
the USB one.
However, the 2.4 kernel doesn't generate SCSI hotplug events. That makes this
awfully hard to fix.
Sorry, it seems like WONTFIX. Closing.