[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNOME Shell can't unmount my USB key



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Feb 07, 2016 at 03:20:22PM -0800, Patrick Bartek wrote:
> On Sun, 07 Feb 2016, Me wrote:
> 
> > Hello,
> > 
> > In GNOME Shell, when I click on the "Eject" option in the notification
> > bar to unmount my USB key, it unmounts correctly and then immediately
> > mounts again, as if I just plugged it.
> > 
> > It happens only with the Kingston DataTraveler I own. I've tried on
> > several desktops, and it seems to happen only with GNOME Shell. MATE,
> > XFCE, and Ubuntu with Unity don't have the issue. And when I unmount
> > it with Nautilus, it stays unmounted, as it should.
> > 
> > This bug is annoying, as I can't be sure that nothing is writing on my
> > key before unplugging it.
> > 
> > I want to find the cause, and if necessary write a bug report. I need
> > advice : should I report the bug to Debian or GNOME ? What additional
> > information could I provide that could help ?
> > 
> > Obviously, if someone has a way to fix this without reporting a bug, I
> > would also be happy to read it.
> 
> You shouldn't have to "eject" it all.  Just plug it in and when done,
> pull it out. The system should mount and unmount it automatically. We're
> not talking Windows here.

This seems like *very* bad advice. The system keeps a cache[1] of the data
in the USB and flushes this cache only from time to time (that's what
makes accesses to the otherwise slow USB pretty fast).

Unmounting (however you achieve it -- be it from the command line or from
some desktop-y GUI, which labels this operation as "ejecting" or "safe
removal" or other more confusing terms) flushes (i.e. writes back) all the
"dirty" data in the cache and prevents more accesses to the device.

Only then can you remove it without fear of losing data.

Otherwise you either lose the last writes to the device (if you're
lucky and/or have a civilised file system on your stick, like ext3/ext4),
or the whole file system is thrashed (more likely when you have an
uncivilised filesystem, like some variation of FAT).

Take care

[1] actually it's more than one cache. It's caches all the way down!

- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAla4RSYACgkQBcgs9XrR2kbAcwCdF2JgbOOnG8WYXgPVqjJa+9hJ
pDcAniMbrT5z8tHvpaJnIpohtex55ex3
=5MP2
-----END PGP SIGNATURE-----


Reply to: