After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683038 - unmounting block devices is confusing
unmounting block devices is confusing
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-30 14:50 UTC by Martin Pitt
Modified: 2018-09-21 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martin Pitt 2012-08-30 14:50:50 UTC
I've just struggled a bit with trying to unmount an USB stick partition with gvfs-mount. --help leaves it a bit unclear whether -d just specifies a device, or also specifies "mount this":

  -d, --device=DEVICE             Mount volume with device file
  -u, --unmount                   Unmount

so my first approach was

  $ gvfs-mount --unmount --device /dev/sdb1
Error mounting /dev/sdb1: Device /dev/sdb1 is already mounted at `/media/martin/4805-C45B'

So apparently that tried to mount, not unmount. This felt like a bug at first, if this is intended, "--device" is a confusing name IMHO.

When trying without -d, it does not look much better:

$ gvfs-mount -u /dev/sdb1
Error finding enclosing mount: Containing mount does not exist

Which does not tell me much either.

What does work is to grab the URI from gvfs-mount -li, and using that:

$ gvfs-mount -u file:///media/martin/4805-C45B

This is at least an usability bug, but if it's meant to work like this there is no way to unmount by device file. I'd like to improve this.

What would you prefer? Making "-u -d /dev/..." work and update the description of -d? Or making "-u /dev/..." do what I mean? Or at least improve the help text to point out that "-d" is an operation, not just a device specification, and unmount works with URIs?
Comment 1 GNOME Infrastructure Team 2018-09-21 17:18:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/192.