Incorrect mount/umount/REMOVE behavior of USB drive

Bug #412449 reported by Noel J. Bergman
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gvfs
Expired
Medium
gvfs (Ubuntu)
Triaged
Wishlist
Ubuntu Desktop Bugs

Bug Description

Host: Karmic, fully updated at time of posting.

  1) When I insert an external USB drive, Karmic is automatically mounting all of the partitions. This is NOT what I want, but please don't focus on this one issue. Item #2 is arguably worse.

  2) If I open Computer and right click a mounted partition, I can unmount the volume. However, if I click the symbol next to the mounted volume, all of the partitions are unmounted, AND THE DRIVE IS REMOVED.

So after connecting the drive via USB, and checking mounts, I see:

/dev/sdb1 on /media/GRUB type ext3 (rw,nosuid,nodev,uhelper=devkit)
/dev/sdb5 on /media/Fedora 10 type ext3 (rw,nosuid,nodev,uhelper=devkit)
/dev/sdb6 on /media/Ubuntu 8.04.2 type ext3 (rw,nosuid,nodev,uhelper=devkit)
/dev/sdb7 on /media/Ubuntu 8.10 type ext3 (rw,nosuid,nodev,uhelper=devkit)
/dev/sdb8 on /media/Ubuntu 9.10 type ext3 (rw,nosuid,nodev,uhelper=devkit)
/dev/sdb10 on /media/SHARED type xfs (rw,nosuid,nodev,uhelper=devkit)

and after clicking the symbol, which USED to simply unmount undesirably mounted volumes, the entire drive is removed, e.g., there are no more entries under /dev for the drive. udev log file attached.

A few more notes:

  A) the mounting behavior is inconsistent. During testing to prepare the data for this report, I connected and disconnected the drive multiple times. Each time a different set of partitions was mounted.

  B) When I connect the same drive using eSATA instead of USB, I am prompted that authentication is required to mount volumes, whereas this is not required when the same drive is connected over USB.

  C) The unmount versus remove behavior appears to be USB specific. If I use eSATA, the behavior is to simply unmount the partition, as expected. I also have an SDHC card in the built-in reader. It, too, is auto-mounted, but unlike the USB drive, clicking the icon next to the mounted volume only unmounts the volume.

Unclear to me how much of this is nautilus, how much is DevceKit, etc., but I'll leave that for others to reassign. I suspect that DeviceKit is to blame for at least some of the behavior, but want to focus on this newly introduced defect that removes the drive instead of unmounting the partition.

Revision history for this message
Noel J. Bergman (noeljb) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, why do you need to unmount a partition on the disk? Read http://bugzilla.gnome.org/show_bug.cgi?id=576587 for discussion about the change

Changed in nautilus (Ubuntu):
importance: Undecided → Wishlist
status: New → Incomplete
affects: nautilus (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
status: Incomplete → Triaged
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
Revision history for this message
Noel J. Bergman (noeljb) wrote :

Why is this marked as Incomplete? Are you asking me to justify why this regression is broken?

Why do I want to unmount a volume?! I don't want it mounted in the first place! OK, it is probably acceptable to mount the single volume when a drive is attached, whereas nhen a drive with multiple volumes is attached, NONE should be auto-mounted, rather than all. But at least one can go into apps/nautilus/preferences and turn off media_automount and media_automount_open.

However, I don't want the entire drive removed just because I have unmounted a volume! Why might I unmount it? Oh, let's see:

  a) I want to run fsck
  b) I want to run dd
  c) I want to run other utilities that want to operate on UNMOUNTED volumes
  d) I might be backing up volumes, and need precise control over when and where they are mounted
  e) I might just be paranoid, and prefer to keep unused volumes unmounted
  f) etc.

As noted in the upstream report, "in order to use the device again, you will have to replug it", which basically repeats the cycle.

Here's another little tidbit for you: if you turn off automount, and then MANUALLY mount the volume(s) you want, when you click the "eject" icon, the old behavior is back: it only unmounts, rather than removes.

As noted upstream, a solution would be to display both the drive AND the volumes, such that DRIVES are removed and VOLUMES are unmounted. That GUI change would be satisfactory.

Changed in gvfs:
status: Unknown → New
Revision history for this message
Noel J. Bergman (noeljb) wrote :

In Bug 396448, Martin Pitt lists additional reasons why the auto-mounting of multiple partitions is a Really Bad Idea.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the automounting is a good idea on removal devices though which is the case in this example

Revision history for this message
Noel J. Bergman (noeljb) wrote :

> automounting is a good idea on removal devices

Justify that claim. I concur with you in the case where there is only one mountable partition on the removable device, but NOT when there are multiple. That's where this whole thing, including removal, is mis-handled.

Consider, for example, the handling of my Ultrabay. I pop in a drive with half a dozen partitions, and the first thing that you want to do is mount them all. WRONG! Stop thinking of removable media as single use toys.

Revision history for this message
Sebastien Bacher (seb128) wrote :

You are arguing at the wrong place we mainly distribute this code and to be fair your agressive tone doesn't make me want to look at your issue

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Sebastien, if by aggressive tone, you mean my "justify that claim" comment, it was an echo of your request that I justify why I want to "unmount a partition on the disk". To be fair, I wouldn't have to unmount if it hadn't been mounted in the first place. :-) But I could have put a smiley or two into the comment.

And there really does seem to be this thinking that removable media are always single use things like jump drives, when they are also removable hard drives in docking bays, external drives on eSATA and USB, etc. The people talking about separating device and volume clearly understand the more complex issue.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, not discussing that this is an issue it's rather a corner case and non trivial change though and the current ubuntu team doesn't have the ressources to deal with those changes in a distribution specific way

Changed in gvfs:
importance: Unknown → Medium
Changed in gvfs:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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