Bug 135074 - hal doesn't recognize my USB stick
hal doesn't recognize my USB stick
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-08 10:12 EDT by Nils Philippsen
Modified: 2013-03-05 22:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 18:54:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
syslog messages when plugging in the USB stick. (1.26 KB, text/plain)
2004-10-08 10:26 EDT, Nils Philippsen
no flags Details
Output from "hald --daemon=no --verbose=yes" run as root (5.37 KB, text/plain)
2004-10-08 10:33 EDT, Nils Philippsen
no flags Details
syslog messages when plugging in the USB stick. (3.11 KB, text/plain)
2004-10-08 10:50 EDT, Nils Philippsen
no flags Details
Output from "hald --daemon=no --verbose=yes" run as root (24.77 KB, text/plain)
2004-10-08 10:52 EDT, Nils Philippsen
no flags Details
lshal output when it doesn't recognize the device (44.63 KB, text/plain)
2004-10-08 10:56 EDT, Nils Philippsen
no flags Details
lshal output when it recognizes the device (50.17 KB, text/plain)
2004-10-08 10:56 EDT, Nils Philippsen
no flags Details
screenshot of many funny icons that are all my one and only usb stick (381.11 KB, image/png)
2004-10-08 10:59 EDT, Nils Philippsen
no flags Details
/etc/fstab (1.58 KB, text/plain)
2004-10-08 11:00 EDT, Nils Philippsen
no flags Details

  None (edit)
Description Nils Philippsen 2004-10-08 10:12:19 EDT
Description of problem:

When plugging in my USB stick, the kernel recognizes it, device nodes
get created by udev, scsi.agent recognizes it and pam_console.dev
restores console perms for the device files, but it doesn't show up in
lshal or hal-device-manager. Needless to say that no entries show up
in fstab.

Version-Release number of selected component (if applicable):

hal-0.2.98.cvs20040929-3

How reproducible:

Easy.

Steps to Reproduce:
1. Plug in the USB stick
  
Actual results:

As described.

Expected results:

HAL should recognize the device and run fstab-sync accordingly to
update /etc/fstab so that in the end Nautilus shows me the device and
the console user can mount it.

Additional info:

Logs following.
Comment 1 Nils Philippsen 2004-10-08 10:26:01 EDT
Created attachment 104936 [details]
syslog messages when plugging in the USB stick.
Comment 2 Nils Philippsen 2004-10-08 10:27:06 EDT
nils@gibraltar:~> cat /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: Generic  Model: Traveling Disk   Rev: 1.11
  Type:   Direct-Access                    ANSI SCSI revision: 02
Comment 3 Nils Philippsen 2004-10-08 10:33:26 EDT
Created attachment 104937 [details]
Output from "hald --daemon=no --verbose=yes" run as root
Comment 4 Nils Philippsen 2004-10-08 10:50:02 EDT
Created attachment 104938 [details]
syslog messages when plugging in the USB stick.
Comment 5 Nils Philippsen 2004-10-08 10:52:32 EDT
Created attachment 104939 [details]
Output from "hald --daemon=no --verbose=yes" run as root

What I did is here:

- start hald as described
- plug in USB stick, doesn't get recognized
- plug it out and plug it in again, it get's recognized
Comment 6 Nils Philippsen 2004-10-08 10:56:04 EDT
Created attachment 104940 [details]
lshal output when it doesn't recognize the device
Comment 7 Nils Philippsen 2004-10-08 10:56:38 EDT
Created attachment 104941 [details]
lshal output when it recognizes the device
Comment 8 Nils Philippsen 2004-10-08 10:58:53 EDT
Funny: In the course of this, it mounted the stick a number of times.
It only doesn't cause the mount points (in the GUI) to vanish. I'll
attach a screenshot and the resulting fstab.
Comment 9 Nils Philippsen 2004-10-08 10:59:42 EDT
Created attachment 104942 [details]
screenshot of many funny icons that are all my one and only usb stick
Comment 10 Nils Philippsen 2004-10-08 11:00:13 EDT
Created attachment 104943 [details]
/etc/fstab
Comment 11 Nils Philippsen 2004-10-08 11:02:36 EDT
Only the mountpoint in /media/usbdisk3 has contents, the others are
empty -- but they should be umounted and deleted from fstab. Another
data point is that in the course of trying things, the device got
first /dev/sda,m then sdb, sdc, now sdd.
Comment 12 David Zeuthen 2004-10-15 09:23:59 EDT
As we discussed on IRC last week, I've not fixed the issue with the
very first hotplug event. Please try hal-0.4.0-2.

Please see if it now works for you and if it does please close this bug.

Thanks,
David
Comment 13 Nils Philippsen 2004-10-15 11:11:49 EDT
It works if I always remember to umount it before unplugging ;-). IN
fact I was a little surprised, when it umounted it automatically --
which worked for the first 2 times. The third time it didn't, I got a
lot of SCSI errors in the log and when trying to umount it manually I
got a pile of stuck processes:

root@gibraltar:~> ps auxw|awk '{if ($8~"D") print}'
root      3322  0.1  0.5  9048 6156 ?        Ds   16:57   0:01 hald
root      6054  0.0  0.0     0    0 ?        D    17:04   0:00 [scsi_eh_4]
root      6813  0.0  0.0  3640  648 pts/3    D+   17:08   0:00 umount
/media/409A-06C3/
root@gibraltar:~>

BTW: Is there a way to give the device a more obvious mount point,
e.g. the old "/media/usbstick"?

Versions I use:

root@gibraltar:~> uname -a
Linux gibraltar 2.6.8-1.610 #1 Tue Oct 12 17:32:34 EDT 2004 i686 i686
i386 GNU/Linux
root@gibraltar:~> rpm -q hal udev
hal-0.4.0-2
udev-038-2
Comment 14 David Zeuthen 2004-10-15 18:54:15 EDT
> It works if I always remember to umount it before unplugging ;-). IN
> fact I was a little surprised, when it umounted it automatically --
> which worked for the first 2 times. The third time it didn't, I got a
> lot of SCSI errors in the log and when trying to umount it manually I
> got a pile of stuck processes:

Sounds like a kernel bug to me - it would be nice if the kernel would
do the right thing even if we don't cleanly unmount the device but it
is my understanding this needs upstream kernel work. If you can
reproduce this with cleanly unmounting the device every time then
please reopen this bug because I'm going to close it as RAWHIDE.

> /media/409A-06C3/
..
> BTW: Is there a way to give the device a more obvious mount point,
> e.g. the old "/media/usbstick"?

Certainly. See the fstab-sync man page for details. Btw, I've changed
the defaults to not use the UUID so it will be /media/usbdisk%d or
something. If you put a label on the filesystem and it meets certain
criteria this will be used instead. See bug 135907 for details.

Thanks,
David


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