GNOME Bugzilla – Bug 683038
unmounting block devices is confusing
Last modified: 2018-09-21 17:18:03 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?
-- 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.