Bug 135074 - hal doesn't recognize my USB stick
Summary: hal doesn't recognize my USB stick
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hal
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-08 14:12 UTC by Nils Philippsen
Modified: 2013-03-06 03:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-15 22:54:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
syslog messages when plugging in the USB stick. (1.26 KB, text/plain)
2004-10-08 14:26 UTC, Nils Philippsen
no flags Details
Output from "hald --daemon=no --verbose=yes" run as root (5.37 KB, text/plain)
2004-10-08 14:33 UTC, Nils Philippsen
no flags Details
syslog messages when plugging in the USB stick. (3.11 KB, text/plain)
2004-10-08 14:50 UTC, Nils Philippsen
no flags Details
Output from "hald --daemon=no --verbose=yes" run as root (24.77 KB, text/plain)
2004-10-08 14:52 UTC, Nils Philippsen
no flags Details
lshal output when it doesn't recognize the device (44.63 KB, text/plain)
2004-10-08 14:56 UTC, Nils Philippsen
no flags Details
lshal output when it recognizes the device (50.17 KB, text/plain)
2004-10-08 14:56 UTC, 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 14:59 UTC, Nils Philippsen
no flags Details
/etc/fstab (1.58 KB, text/plain)
2004-10-08 15:00 UTC, Nils Philippsen
no flags Details

Description Nils Philippsen 2004-10-08 14:12:19 UTC
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 14:26:01 UTC
Created attachment 104936 [details]
syslog messages when plugging in the USB stick.

Comment 2 Nils Philippsen 2004-10-08 14:27:06 UTC
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 14:33:26 UTC
Created attachment 104937 [details]
Output from "hald --daemon=no --verbose=yes" run as root

Comment 4 Nils Philippsen 2004-10-08 14:50:02 UTC
Created attachment 104938 [details]
syslog messages when plugging in the USB stick.

Comment 5 Nils Philippsen 2004-10-08 14:52:32 UTC
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 14:56:04 UTC
Created attachment 104940 [details]
lshal output when it doesn't recognize the device

Comment 7 Nils Philippsen 2004-10-08 14:56:38 UTC
Created attachment 104941 [details]
lshal output when it recognizes the device

Comment 8 Nils Philippsen 2004-10-08 14:58:53 UTC
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 14:59:42 UTC
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 15:00:13 UTC
Created attachment 104943 [details]
/etc/fstab

Comment 11 Nils Philippsen 2004-10-08 15:02:36 UTC
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 13:23:59 UTC
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 15:11:49 UTC
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 22:54:15 UTC
> 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.