Bug 167108 - nautilus Computer window does not update when usb2 harddrive is plugged in
nautilus Computer window does not update when usb2 harddrive is plugged in
Product: Fedora
Classification: Fedora
Component: nautilus (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
Depends On:
  Show dependency treegraph
Reported: 2005-08-30 09:28 EDT by Jef Spaleta
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-25 19:37:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Workaround race condition between sysfs and /proc/mounts (2.62 KB, patch)
2005-10-25 18:39 EDT, Jon Nettleton
no flags Details | Diff
More complete and robust fix for the race condition (4.20 KB, patch)
2005-10-30 21:45 EST, Jon Nettleton
no flags Details | Diff
Properly read netlink messages as individual datagrams (2.52 KB, patch)
2005-10-31 07:38 EST, Jon Nettleton
no flags Details | Diff

  None (edit)
Description Jef Spaleta 2005-08-30 09:28:34 EDT
Description of problem:
1)Plugin and power up the usb2 ide harddrive enclosure. 
2)fstab and /media  update as expected
fstab entry:
/dev/sdb1               /media/MUSIC_1          vfat      
  pamconsole,exec,noauto,managed 0 0
ls /media:
cdrecorder  floppy  MUSIC_1

3)Nautilus Computer window does not show the new filesystem mountpoint
4)manually mount MUSIC_1 in a terminal
5)Nautilus Computer window updates to show mounted device
6)umount device
7)Nautilus Computer window shows the MUSIC_1 as unmounted
8)depower device, fstab and media revert as expected... nautilus Computer window
continues to show the device even though the device is no longer present.   

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


How reproducible:
always on the development box. 

Do you need any additional logs or information?
This is somewhat of the opposite symptom of what I was seeing with the ipod, so
I thought I'd file this as well in case its was a different problem with the
nautilus/hal interaction.

Comment 1 Jef Spaleta 2005-09-10 22:11:21 EDT
Instead of opening a new bug.. I'd like to update this one.
I now have nautilus-2.12.0-1  installed and nautilus is completely ignoring ALL
the mountable drives. hal is updating fstab correctly and I can mount all my
devices via a terminal. But nautilus isn't showing any of them... even if they
are mounted.

floppy,cd-recorder,usb harddrive, usb compact flash, ipod all no longer show up
in nautilus Computer window nor in the disk mounter panel applet. All these
devices are still mountable via the cmdline and get appropriate fstab entries
and /media/ mountpoints.

Is this a dbus issue?

Comment 2 Jef Spaleta 2005-09-29 20:43:14 EDT
Some people thought this behavior was related to the seg faulting
gnome-vfs-daemon  but appearently it is not. Today's rawhide updates fixed the
gnome-vfs-daemon crash.  I am rawhide synced as of sep 29 and the Computer
window still doesn't correctly update itself with regard to removable devices. 

Comment 3 Jon Nettleton 2005-09-29 21:30:01 EDT
An additional behavior that I have seen is the following

1) insert usb drive
2) Disk Mounter applet shows that the drive is present
3) click Mount "usb drive name" ( Open "usb drive name" not a selectable option)
4) error box pops up with the following message

mount: /dev/sda1 already mount or /media/usbdisk busy
mount: according to mtab, /dev/sda1 is already mounted on /media/usbdisk

This error is true.  The drive is mounted and accessible from commandline. 
Nautilus is able to see the drive, but cannot browse it.
Comment 4 Jon Nettleton 2005-10-25 18:39:10 EDT
Created attachment 120391 [details]
Workaround race condition between sysfs and /proc/mounts

This problem comes from a race condition in hal between the time that sysfs
creates the mount notification and when /proc/mounts is updated.  We talked
about this on the Hal dev list and it appears this can't be fixed in the
kernel.  We have worked out a proposed patch that I will attach.  CVS should be
updated with it tonight.
Comment 5 Rodd Clarkson 2005-10-27 21:16:07 EDT
Has this been applied, and released into rawhide?

If so then I'm not seeing any improvements today.

My USB key (for example) mounts, but neither appears in computer or on the desktop.
Comment 6 Jon Nettleton 2005-10-30 21:45:51 EST
Created attachment 120553 [details]
More complete and robust fix for the race condition

I have sent this out to the Hal mailing list as a more robust fix for this race
condition.  It tries to minimize the time spent sleeping, and taking into
consideration mount and unmount requests.
Comment 7 Jon Nettleton 2005-10-31 07:38:41 EST
Created attachment 120561 [details]
Properly read netlink messages as individual datagrams

This is a second problem that could cause your drive to not mount.  If the
mount requests happen close enough the first one would be parsed from netlink
and the second message would be thrown out.
Comment 8 Jef Spaleta 2005-11-15 20:06:53 EST
Good news:
Okay as of today's rawhide... nautilus sees my usb-storage device mountpoints.

Bad news:
when I unmount and remove the usb storage devices, nautilus isn't removing those
listing from the Computer window.
Comment 9 Rodd Clarkson 2005-11-15 20:22:15 EST
It's just Bad News for me.

The device mounts and unmounts, but I don't see anything in either computer or
in the disk mounter applet.

Interestingly, looking at /etc/fstab I see:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1                /                       ext3    defaults        1 1
/dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs   defaults        0 0
LABEL=/home             /home                   ext3    defaults        1 2
/dev/proc               /proc                   proc    defaults        0 0
/dev/sys                /sys                    sysfs   defaults        0 0
LABEL=/var              /var/www                ext3    defaults        1 2
LABEL=SWAP-sda8         swap                    swap    defaults        0 0
/dev/hdc                /media/cdrecorder       auto   
pamconsole,exec,noauto,managed 0 0
/dev/uba1               /media/KINGSTON         vfat   
pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t:s0,managed 0 0

It appears the USB device is being detected as /dev/uba1 which I've never seen
before.  In the past it's always been /dev/sd?

I'm not sure if this is a USB2 device, or if that matters.  It's a USB Key.
Comment 10 Jef Spaleta 2006-03-25 19:37:11 EST
I'm closing this out as the original reporter, I no longer see the problem with
my device and we've moved away from the fstab entry stuff anyways with the new
hal implementation now in -devel and fc5.  Please refile new bug reports instead
of reopening this one if you have similar symptoms with current -devel or fc5.


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