Comment 3 for bug 42017

Revision history for this message
Christof Krüger (christofkr) wrote :

The problem is that the USB entries entries are marked as user_visible by gnome-vfs. When booting with the usb drive not connected, gnome-vfs lists the drive without any mounted volumes. The entry has no hal udi and the device_path is the same that is listed in /etc/fstab. Additionally, activation_uri is set to the mount point set in fstab. In my case it is a /dev/usb200gig and /media/200gig.

Now when you plug in the USB drive, udev creates a dev file, let us say /dev/sda1. Because of the custom udev-rule, a symlink to /dev/sda1 is created. In this example /dev/usb200gig is now pointing to /dev/sda1.

Gnome-vfs now lists an _additional_ drive entry with an hal udi and device_path being /dev/sda1.

The diskmount applet displays all "user_visible" drives, so now there is one button for the /dev/usb200gig (which has no volumes mounted, because gnome-vfs ignores it) and one button for "/dev/sda1" which can have a volume entries when it is actually mounted.

A workaround for this is to 'killall gnome-vfs-daemon' from console. It will respawn immediately and only list the one device from there on. This entry has an hal udi, actuvation uri, the device path is /dev/sda1. Looks like gnome-vfs follows the symlink now. It couln't follow it back then because it didn't exist the last time gnome-vfs checked. And here lies the problem: It doesn't check often enough. When a new device is being attached, gnome-vfs should check if one of the already present devices is available now and if it is actually the same one.

The fact that the device list is _not_ invariant (it's different, after restarting gnome-vfs) shows that this is actually a bug.