usb flash drive fails to automount

Bug #450546 reported by Bernhard
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Binary package hint: devicekit-disks

My usb flash drive (which is generally fine and mounts most of the time) fails to mount. This happens about once a week, the other times it mounts fine. It usually mounts successful after a reboot, so I think there is a software problem.

ProblemType: Bug
Architecture: i386
DKDisksMonitorLog: Monitoring activity from the disks daemon. Press Ctrl+C to cancel.
Date: Tue Oct 13 19:39:38 2009
DistroRelease: Ubuntu 9.10
HotplugNewDevices: /dev/sdc /dev/sdc1
HotplugNewMounts:

MachineType: FUJITSU SIEMENS AMILO Si 2636
Package: devicekit-disks 007-2ubuntu1
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-12-generic root=UUID=84220d24-fa23-49b5-9127-0a8f5e7a6ab7 ro splash quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
SourcePackage: devicekit-disks
Symptom: storage
Uname: Linux 2.6.31-12-generic i686
dmi.bios.date: 01/14/2008
dmi.bios.vendor: Phoenix
dmi.bios.version: 1.0B-1471-0012
dmi.board.name: MR030___
dmi.board.vendor: FUJITSU SIEMENS
dmi.board.version: 8r7c21245
dmi.chassis.type: 10
dmi.chassis.vendor: FUJITSU SIEMENS
dmi.chassis.version: Version 1.0
dmi.modalias: dmi:bvnPhoenix:bvr1.0B-1471-0012:bd01/14/2008:svnFUJITSUSIEMENS:pnAMILOSi2636:pvrREFERENCE:rvnFUJITSUSIEMENS:rnMR030___:rvr8r7c21245:cvnFUJITSUSIEMENS:ct10:cvrVersion1.0:
dmi.product.name: AMILO Si 2636
dmi.product.version: REFERENCE
dmi.sys.vendor: FUJITSU SIEMENS

Revision history for this message
Bernhard (b.a.koenig) wrote :
Revision history for this message
Andrea Grandi (andreagrandi) wrote :

Hi, I have the same bug and I reported it here: https://bugs.launchpad.net/ubuntu/+source/hal/+bug/442398
I tried this workaround: deleting /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi and restarting HAL service.
Doing that the USB disks/keys mounting works almost fine, but I continue having some problems:

- disks are mounted with a wrong label (for example my old USB disk is mounted with "}" label and I cannot rename it.
- if I look into disk properties of a mounted disk it says it cannot access to its properties and I confirm there are a lot of less options compared to Jaunty (I can provide you a screenshot if you want, just ask).

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

p.s: shouldn't HAL be deprecated? Why is still used/involved in disks mounting?

Revision history for this message
Martin Pitt (pitti) wrote :

> p.s: shouldn't HAL be deprecated? Why is still used/involved in disks mounting?

It's still used in KDE, but not in GNOME.

Revision history for this message
Martin Pitt (pitti) wrote :

devkit-disks seems to detect it just fine. What is the output of

  devkit-disks --mount /dev/sdc1

?

Please also check out the update of udev in bug 463347, this fixed a lot of those spurious mount failures.

Changed in devicekit-disks (Ubuntu):
status: New → Incomplete
Revision history for this message
Bernhard (b.a.koenig) wrote :

Hi Martin,

According to the test posted in bug 463347, I'm not affected by this bug.

Please note that this mount problem is just temporary, the usb drive mounted fine after a restart and unfortunately, I cannot reproduce it at all times.

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :

Hi Martin,

i think my system is also affected by this bug. I already installed the proposed patch from bug #463347 without any success. After rebooting the system everything is fine, but after some time automount doesen't works any longer.
And this bug is not really reproducible. Sometimes automount works - sometimes (most times!) not.

nico@nico-pc ~ % devkit-disks --mount /dev/sdc1
Mounted /org/freedesktop/DeviceKit/Disks/devices/sdc1 at /media/USB Disk

What do you think of https://bugs.launchpad.net/ubuntu/+source/hal/+bug/442398/comments/15 ? Could this be a conflict between hal and devkit-disk? May i try the mentioned solution?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 450546] Re: usb flash drive fails to mount

Nico Isenbeck [2009-11-09 13:58 -0000]:
> nico@nico-pc ~ % devkit-disks --mount /dev/sdc1
> Mounted /org/freedesktop/DeviceKit/Disks/devices/sdc1 at /media/USB Disk

This seems to work. I'm afraid I need debug logs for the case where it
doesn't work

> What do you think of
> https://bugs.launchpad.net/ubuntu/+source/hal/+bug/442398/comments/15 ?
> Could this be a conflict between hal and devkit-disk? May i try the
> mentioned solution?

This sounds very improbable, since GNOME is not using hal for mounting
device at all any more. You can of course try to stop hal entirely
with

  sudo stop hal

and check if that makes any difference?

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote : Re: usb flash drive fails to mount

Mounting the device with "devkit-disks --mount /dev/sdc1" always works, even if it is doesn't get mounted automatically. It also gets mounted when I logout and login to GNOME again. But it doesn't get mounted automatically when plugged in.

I just started by system, so it will work now. I'll try it later with stopping hal.
Which debug logs do you need? dmesg? what else?

Revision history for this message
Martin Pitt (pitti) wrote :

Please do

  gvfs-mount -oi

then plug in the drive, let it settle for some seconds, and copy&paste the entire output. Then press Control-C to stop the monitor.

Thanks!

affects: devicekit-disks (Ubuntu) → gvfs (Ubuntu)
Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :

I did the following:

nico@nico-pc ~ % gvfs-mount -oi
Monitoring events. Press Ctrl+C to quit.

  -> plug in the usb flash drive, plug out

^C
130 nico@nico-pc ~ % sudo gvfs-mount -oi
Monitoring events. Press Ctrl+C to quit.

  -> plug in the usb flash drive, plug out

^C
130 nico@nico-pc ~ % sudo stop hal
hal stop/waiting
130 nico@nico-pc ~ % sudo gvfs-mount -oi
Monitoring events. Press Ctrl+C to quit.

  -> plug in the usb flash drive, plug out
^C

As you can see, there was absolutely no output and the device was not mounted!
After that i tried to mount it manually with "devkit-disks --mount /dev/sdc1" and the output was:

Monitoring events. Press Ctrl+C to quit.
Mount added: 'USB Disk'
  Mount(0): USB Disk -> file:///media/USB%20Disk
    Type: GUnixMount
    themed icons: [drive-harddisk] [drive]
    can_unmount=1
    can_eject=0
    is_shadowed=0

^C

After mounting it manually the flash drive was mounted automatically on next connect with the same output of "gvfs-mount -oi"

I attached the output of dmesg while connecting the flash drive, lspci and lsusb.

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :
Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Interesting, so it seems that gvfs does not notice the new device. Just to be sure, can you please also do

  devkit-disks --monitor-detail

and then plug in your drive? Do you get output then (while gvfs-mount -oi doesn't)?

Thanks!

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :

Also no output for
  devkit-disks --monitor-detail

Revision history for this message
Martin Pitt (pitti) wrote :

> Also no output for devkit-disks --monitor-detail

Hmm. Do you get output when you start "udevadm monitor -e --udev" and then plug in the drive?

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :

With "udevadm monitor -e --udev" I get a very long output (see attachment). I tried it two times, both times the usb flash drive was not automounted. You'll find the complete output in the attachment - hope this helps you!

summary: - usb flash drive fails to mount
+ usb flash drive fails to automount
Revision history for this message
piratemurray (mez-pahlan) wrote :

Hi there. I may have a related problem on bug #413131.

I got no output on gvfs-mount -oi but here are my outputs for the other two monitor commands attached. I hope this sheds some light on things and why they aren't working.

Revision history for this message
piratemurray (mez-pahlan) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Nico, thanks a lot. That proves that udev is working, but devicekit-disks does not emit any events for some reason. This is actually the first time that I saw a problem like this, so I'm afraid I need to bother you some more.

Can you please do

  sudo /usr/lib/devicekit-disks/devkit-disks-daemon --replace 2>&1 | tee /tmp/dkd.log

and then plug in the USB stick. Let it settle down, and then press Control-C and attach /tmp/dkd.log.

Thanks!

Revision history for this message
Martin Pitt (pitti) wrote :

@piratemurray: your devkit-disks monitoring works, so you have a different problem (also, your udev monitor log was identical to the devkit monitor log). 413131 is the wrong bug. Let's continue to discuss your issue in a separate bug.

Revision history for this message
Nico Isenbeck (nico-isenbeck) wrote :

Hi Martin,

You'll find the output of the above mentioned command attached.

Maybe you need some more information about my drives?
sda1: ext3 /
sda5: encrypted swap
sdb1: external usb hard disk (truecrypt device/volume) for backups. Without beeing mounted with truecrypt there are no filesystem or partitions visible. Could this be a problem?
sdc1: usb flash drive with automount problems

I also recognized that the truecrypt usb drive starts up sometimes without accessing it. With Ubuntu 8.10 the drive sleeped the whole day and only waked up when my backup cronjob started. Is it possible that devkit tries to mount this usb drive without success because there seems to be no filesystem on it? After i typed in your last command the drive also started up.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, there we go: it dies under your hands:

   devkit-disks-daemon: atasmart.c:2725: sk_disk_set_blob: Assertion `blob' failed.

This is bug 419663, marking as a duplicate.

Changed in gvfs (Ubuntu):
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.