Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #163922 > unrolled thread

GNOME Shell can't unmount my USB key

Started byMe <mlistsgn@gmail.com>
First post2016-02-07 23:50 +0100
Last post2016-02-13 02:30 +0100
Articles 20 on this page of 35 — 11 participants

Back to article view | Back to linux.debian.user


Contents

  GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-07 23:50 +0100
    Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-08 00:30 +0100
      Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-08 01:00 +0100
      Re: GNOME Shell can't unmount my USB key <tomas@tuxteam.de> - 2016-02-08 09:20 +0100
        Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-08 09:50 +0100
          Re: GNOME Shell can't unmount my USB key <tomas@tuxteam.de> - 2016-02-08 10:50 +0100
            Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-08 11:00 +0100
              Re: GNOME Shell can't unmount my USB key Sven Arvidsson <sa@whiz.se> - 2016-02-15 15:30 +0100
                Re: GNOME Shell can't unmount my USB key Me Em <mlistsgn@gmail.com> - 2016-02-18 21:40 +0100
        Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-08 23:00 +0100
          Re: GNOME Shell can't unmount my USB key <tomas@tuxteam.de> - 2016-02-08 23:30 +0100
          Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-09 11:50 +0100
            Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-09 18:10 +0100
              Re: GNOME Shell can't unmount my USB key David Wright <deblis@lionunicorn.co.uk> - 2016-02-09 19:10 +0100
                Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-11 20:00 +0100
                  Re: GNOME Shell can't unmount my USB key David Wright <deblis@lionunicorn.co.uk> - 2016-02-11 22:30 +0100
                    Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-12 18:00 +0100
                  Re: GNOME Shell can't unmount my USB key <tomas@tuxteam.de> - 2016-02-12 09:50 +0100
                    Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-12 18:40 +0100
              Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-09 19:50 +0100
                Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-11 20:20 +0100
                  Re: GNOME Shell can't unmount my USB key Chris Bannister <cbannister@slingshot.co.nz> - 2016-02-11 23:30 +0100
                    Re: GNOME Shell can't unmount my USB key Lisi Reisz <lisi.reisz@gmail.com> - 2016-02-12 00:00 +0100
                      Re: GNOME Shell can't unmount my USB key David Wright <deblis@lionunicorn.co.uk> - 2016-02-12 03:50 +0100
                        Re: GNOME Shell can't unmount my USB key Lisi Reisz <lisi.reisz@gmail.com> - 2016-02-12 11:00 +0100
                    Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-12 18:10 +0100
              Re: GNOME Shell can't unmount my USB key Brian <ad44@cityscape.co.uk> - 2016-02-09 21:20 +0100
                Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-11 20:50 +0100
          Re: GNOME Shell can't unmount my USB key Bernard <bdebreil@teaser.fr> - 2016-02-15 01:30 +0100
      Re: GNOME Shell can't unmount my USB key Stuart Longland <stuartl@longlandclan.id.au> - 2016-02-09 22:30 +0100
        Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-11 21:00 +0100
          Re: GNOME Shell can't unmount my USB key Me <mlistsgn@gmail.com> - 2016-02-11 22:00 +0100
            Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-12 19:30 +0100
              Re: GNOME Shell can't unmount my USB key Stuart Longland <stuartl@longlandclan.id.au> - 2016-02-12 22:50 +0100
                Re: GNOME Shell can't unmount my USB key Patrick Bartek <nemommxiv@gmail.com> - 2016-02-13 02:30 +0100

Page 1 of 2  [1] 2  Next page →


#163922 — GNOME Shell can't unmount my USB key

FromMe <mlistsgn@gmail.com>
Date2016-02-07 23:50 +0100
SubjectGNOME Shell can't unmount my USB key
Message-ID<qZGjw-4vr-9@gated-at.bofh.it>
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.

Thanks.

[toc] | [next] | [standalone]


#163927

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-08 00:30 +0100
Message-ID<qZGWg-54b-117@gated-at.bofh.it>
In reply to#163922
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.

The ONLY time I use "eject" is to physically eject the disk from my
CD/DVD drive.

Try not using "eject" and see what happens.  Use the "mount" command to
see if and where the USB thumb drive is mounted, etc.

B

[toc] | [prev] | [next] | [standalone]


#163929

FromMe <mlistsgn@gmail.com>
Date2016-02-08 01:00 +0100
Message-ID<qZHpg-5iF-13@gated-at.bofh.it>
In reply to#163927
Le dimanche 07 février 2016 à 15:20 -0800, Patrick Bartek a écrit :
> 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.

What if some program, like my backup software, began to write on the key
when I decide to unplug it ? It will be corrupted unless I manually
unmounted it, and the notification is the fastest and easiest way to do
that. I don't want to open a terminal, type 'sudo umount /dev/sdb1' and
give my password each time I unplug my key.

And, what is the point of having an "Eject" option if just unplugging
the key is safe ? Windows also unmounts USB keys when they are
unplugged, and that doesn't make it safe.

[toc] | [prev] | [next] | [standalone]


#163930

From<tomas@tuxteam.de>
Date2016-02-08 09:20 +0100
Message-ID<qZPd8-2z8-5@gated-at.bofh.it>
In reply to#163927
-----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-----

[toc] | [prev] | [next] | [standalone]


#163931

FromMe <mlistsgn@gmail.com>
Date2016-02-08 09:50 +0100
Message-ID<qZPGa-2M0-5@gated-at.bofh.it>
In reply to#163930
Le lundi 08 février 2016 à 08:35 +0100, tomas@tuxteam.de a écrit :
> 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).

Thanks. That's what I'm worried about.

I want to report the bug. Should I send it to Debian or GNOME ?

[toc] | [prev] | [next] | [standalone]


#163932

From<tomas@tuxteam.de>
Date2016-02-08 10:50 +0100
Message-ID<qZQCf-3pM-15@gated-at.bofh.it>
In reply to#163931
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Feb 08, 2016 at 09:45:02AM +0100, Me wrote:
> Le lundi 08 février 2016 à 08:35 +0100, tomas@tuxteam.de a écrit :
> > 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).
> 
> Thanks. That's what I'm worried about.
> 
> I want to report the bug. Should I send it to Debian or GNOME ?

It looks more a GNOME thing to me -- but I guess the Debian GNOME
maintainers are able to cope with it (plus your report would be
targetting the specific version you're using). So Debian seems
to me the first choice here.

Whoever feel free to chime in!

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAla4WoEACgkQBcgs9XrR2kY8BQCfbhCzatJjdDnWho6SET+x7gww
qqsAnRfhUgORL6GqXkUWX4d0b0A9pCRA
=AiPG
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#163933

FromMe <mlistsgn@gmail.com>
Date2016-02-08 11:00 +0100
Message-ID<qZQLV-3tN-27@gated-at.bofh.it>
In reply to#163932
Le lundi 08 février 2016 à 10:06 +0100, tomas@tuxteam.de a écrit :
> It looks more a GNOME thing to me -- but I guess the Debian GNOME
> maintainers are able to cope with it (plus your report would be
> targetting the specific version you're using). So Debian seems
> to me the first choice here.

Thanks for the reply, I reported it to the Debian GNOME maintainer.

[toc] | [prev] | [next] | [standalone]


#164191

FromSven Arvidsson <sa@whiz.se>
Date2016-02-15 15:30 +0100
Message-ID<r2sk2-2aV-17@gated-at.bofh.it>
In reply to#163933

[Multipart message — attachments visible in raw view] — view raw

On Mon, 2016-02-08 at 10:57 +0100, Me wrote:
> Thanks for the reply, I reported it to the Debian GNOME maintainer.
> 

Do you have a bug report number?

I'm interested on following up on this as I experience the same thing
(sometimes).

There have been open bugs about this both upstream and in Ubuntu but it
was resolved as a bug in a specific chipset, which doesn't seem to be
the case here.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5

[toc] | [prev] | [next] | [standalone]


#164343

FromMe Em <mlistsgn@gmail.com>
Date2016-02-18 21:40 +0100
Message-ID<r3DwK-2Fr-1@gated-at.bofh.it>
In reply to#164191

[Multipart message — attachments visible in raw view] — view raw

It's bug 814081 : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814081 .

Le lun. 15 févr. 2016 15:29, Sven Arvidsson <sa@whiz.se> a écrit :

> On Mon, 2016-02-08 at 10:57 +0100, Me wrote:
> > Thanks for the reply, I reported it to the Debian GNOME maintainer.
> >
>
> Do you have a bug report number?
>
> I'm interested on following up on this as I experience the same thing
> (sometimes).
>
> There have been open bugs about this both upstream and in Ubuntu but it
> was resolved as a bug in a specific chipset, which doesn't seem to be
> the case here.
>
> --
> Cheers,
> Sven Arvidsson
> http://www.whiz.se
> PGP Key ID 6FAB5CD5
>
>

[toc] | [prev] | [next] | [standalone]


#163959

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-08 23:00 +0100
Message-ID<r020F-2D0-1@gated-at.bofh.it>
In reply to#163930
On Mon, 08 Feb 2016, tomas@tuxteam.de wrote:

> -----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).

Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
was like that. Anything USB had to be mounted/unmounted manually.
What a pain.  And if you unplugged without unmounting . . .  Yes, things
could break. But with Wheezy which I've been using for 3+ years have
had no problems with just plug/unplug. The only precaution is to check
the drive activity light isn't flickering.

Of course, my install of Wheezy is very custom and minimal: for the GUI
just a window manager, Openbox.  And I custom wrote my own udev rules
for handling USB devices -- thumb drives, cell phones, eBook reader,
etc. But a regular desktop should be set up to do the same thing,
safely.

If the OP's GNOME Shell is not doing this, but other desktops are, then
GNOME might be the problem.

B

[toc] | [prev] | [next] | [standalone]


#163960

From<tomas@tuxteam.de>
Date2016-02-08 23:30 +0100
Message-ID<r02tJ-33a-29@gated-at.bofh.it>
In reply to#163959
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Feb 08, 2016 at 01:50:59PM -0800, Patrick Bartek wrote:
> On Mon, 08 Feb 2016, tomas@tuxteam.de wrote:

[...]

> > 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).
> 
> Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> was like that. Anything USB had to be mounted/unmounted manually.
> What a pain.  And if you unplugged without unmounting . . .  Yes, things
> could break. But with Wheezy which I've been using for 3+ years have
> had no problems with just plug/unplug. The only precaution is to check
> the drive activity light isn't flickering.

Most definitely not. You have just been lucky. As long as a file system
is mounted, the OS is free to keep changed information in RAM, and
flushes it whenever convenient. If you pull the device out while those
changes haven't been flushed, you have data loss. If those changes
concern file system structural information... your file system is
thrashed. File systems with a journal are more robust wrt. to that
event, but the data which was in RAM hasn't made it to the stick.

You have been lucky because basically, if there is I/O bandwidth left,
the flushing happens relatively quickly. But I wouldn't count on
that.

> Of course, my install of Wheezy is very custom and minimal: for the GUI
> just a window manager, Openbox.  And I custom wrote my own udev rules
> for handling USB devices -- thumb drives, cell phones, eBook reader,
> etc.

That doesn't change anything.

> But a regular desktop should be set up to do the same thing,
> safely.

That's why the desktops have this thingy to "remove the device safely",
which under the hood does an unmount.

> If the OP's GNOME Shell is not doing this, but other desktops are, then
> GNOME might be the problem.

See above.

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

iEYEARECAAYFAla5DdUACgkQBcgs9XrR2kb1OgCeKgagYEzyRgt0eU079V/E0EaM
SYsAn2GqWo5Ct7r+H+c9n2cMQeiykq5i
=RE7A
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#163984

FromMe <mlistsgn@gmail.com>
Date2016-02-09 11:50 +0100
Message-ID<r0e1Q-2PZ-13@gated-at.bofh.it>
In reply to#163959
Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a écrit :
> Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> was like that. Anything USB had to be mounted/unmounted manually.
> What a pain.  And if you unplugged without unmounting . . .  Yes, things
> could break. But with Wheezy which I've been using for 3+ years have
> had no problems with just plug/unplug. The only precaution is to check
> the drive activity light isn't flickering.

Just because you didn't lose data doesn't mean it's safe. All systems
are known to use caching, and GNOME frequently informs me, after having
asked to unmount my key, that I shouldn't unplug it until it has
finished to write data on it.

Additionally, I don't have any LED on this drive, which makes it even
more dangerous.

[toc] | [prev] | [next] | [standalone]


#163997

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-09 18:10 +0100
Message-ID<r0jXC-76q-55@gated-at.bofh.it>
In reply to#163984
On Tue, 09 Feb 2016, Me wrote:

> Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a écrit :
> > Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> > was like that. Anything USB had to be mounted/unmounted manually.
> > What a pain.  And if you unplugged without unmounting . . .  Yes,
> > things could break. But with Wheezy which I've been using for 3+
> > years have had no problems with just plug/unplug. The only
> > precaution is to check the drive activity light isn't flickering.
> 
> Just because you didn't lose data doesn't mean it's safe. All systems
> are known to use caching, and GNOME frequently informs me, after
> having asked to unmount my key, that I shouldn't unplug it until it
> has finished to write data on it.

Yes, I know about caching, but on my system read/writes to removable
devices are almost instantaneous.  So, there's been no problems.
However, I did write my on udev rule to do the mounting/unmounting, and
this was after reseaching expert advice on how to do it properly. But
as with any advice, you should do what's best for you.

> Additionally, I don't have any LED on this drive, which makes it even
> more dangerous.

Then my method won't work well for you.

B

[toc] | [prev] | [next] | [standalone]


#163998

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2016-02-09 19:10 +0100
Message-ID<r0kTD-7Hi-5@gated-at.bofh.it>
In reply to#163997
On Tue 09 Feb 2016 at 09:00:50 (-0800), Patrick Bartek wrote:
> On Tue, 09 Feb 2016, Me wrote:
> 
> > Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a écrit :
> > > Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> > > was like that. Anything USB had to be mounted/unmounted manually.
> > > What a pain.  And if you unplugged without unmounting . . .  Yes,
> > > things could break. But with Wheezy which I've been using for 3+
> > > years have had no problems with just plug/unplug. The only
> > > precaution is to check the drive activity light isn't flickering.
> > 
> > Just because you didn't lose data doesn't mean it's safe. All systems
> > are known to use caching, and GNOME frequently informs me, after
> > having asked to unmount my key, that I shouldn't unplug it until it
> > has finished to write data on it.
> 
> Yes, I know about caching, but on my system read/writes to removable
> devices are almost instantaneous.  So, there's been no problems.
> However, I did write my on udev rule to do the mounting/unmounting, and
> this was after reseaching expert advice on how to do it properly.

Apart from not pulling the plug early, what pitfalls are you avoiding
with your carefully crafted udev rule?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#164070

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-11 20:00 +0100
Message-ID<r14D8-4iJ-13@gated-at.bofh.it>
In reply to#163998
On Tue, 09 Feb 2016, David Wright wrote:

> On Tue 09 Feb 2016 at 09:00:50 (-0800), Patrick Bartek wrote:
> > On Tue, 09 Feb 2016, Me wrote:
> > 
> > > Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a écrit :
> > > > Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> > > > was like that. Anything USB had to be mounted/unmounted
> > > > manually. What a pain.  And if you unplugged without
> > > > unmounting . . .  Yes, things could break. But with Wheezy
> > > > which I've been using for 3+ years have had no problems with
> > > > just plug/unplug. The only precaution is to check the drive
> > > > activity light isn't flickering.
> > > 
> > > Just because you didn't lose data doesn't mean it's safe. All
> > > systems are known to use caching, and GNOME frequently informs
> > > me, after having asked to unmount my key, that I shouldn't unplug
> > > it until it has finished to write data on it.
> > 
> > Yes, I know about caching, but on my system read/writes to removable
> > devices are almost instantaneous.  So, there's been no problems.
> > However, I did write my on udev rule to do the mounting/unmounting,
> > and this was after reseaching expert advice on how to do it
> > properly.
> 
> Apart from not pulling the plug early, what pitfalls are you avoiding
> with your carefully crafted udev rule?

In 3 years of use, I've experienced no problems.  Why does no one
believe me? And as far as "carefully crafted,"  I just modified a rule
that was designed exclusively for flash/thumb drives by following the
"manual."

I also did extensive testing to "break" things  which only succeeded by
doing something most would never do anyway like removing the drive
while it was being written to.

B

[toc] | [prev] | [next] | [standalone]


#164082

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2016-02-11 22:30 +0100
Message-ID<r16Yi-5Zm-15@gated-at.bofh.it>
In reply to#164070
On Thu 11 Feb 2016 at 10:49:43 (-0800), Patrick Bartek wrote:
> On Tue, 09 Feb 2016, David Wright wrote:
> 
> > On Tue 09 Feb 2016 at 09:00:50 (-0800), Patrick Bartek wrote:
> > > On Tue, 09 Feb 2016, Me wrote:
> > > 
> > > > Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a écrit :
> > > > > Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12 --
> > > > > was like that. Anything USB had to be mounted/unmounted
> > > > > manually. What a pain.  And if you unplugged without
> > > > > unmounting . . .  Yes, things could break. But with Wheezy
> > > > > which I've been using for 3+ years have had no problems with
> > > > > just plug/unplug. The only precaution is to check the drive
> > > > > activity light isn't flickering.
> > > > 
> > > > Just because you didn't lose data doesn't mean it's safe. All
> > > > systems are known to use caching, and GNOME frequently informs
> > > > me, after having asked to unmount my key, that I shouldn't unplug
> > > > it until it has finished to write data on it.
> > > 
> > > Yes, I know about caching, but on my system read/writes to removable
> > > devices are almost instantaneous.  So, there's been no problems.
> > > However, I did write my on udev rule to do the mounting/unmounting,
> > > and this was after reseaching expert advice on how to do it
> > > properly.
> > 
> > Apart from not pulling the plug early, what pitfalls are you avoiding
> > with your carefully crafted udev rule?
> 
> In 3 years of use, I've experienced no problems.  Why does no one
> believe me? And as far as "carefully crafted,"  I just modified a rule
> that was designed exclusively for flash/thumb drives by following the
> "manual."

I didn't express any disbelief. I've pulled the plug accidently on
occasion and usually find it unmounts ok so long as I haven't tried to
use the missing device (which can be as simple as switching panes in mc).

But I was interested in your rule because I haven't touched
/etc/udev/rules.d/ except to clean stale entries when swapping
NICs or optical drives. Again, you write "you should do some research
on udev and writing rules yourself", but I prefer learning by example
rather than trying to reinvent the wheel.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#164111

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-12 18:00 +0100
Message-ID<r1pey-17H-37@gated-at.bofh.it>
In reply to#164082
On Thu, 11 Feb 2016, David Wright wrote:

> On Thu 11 Feb 2016 at 10:49:43 (-0800), Patrick Bartek wrote:
> > On Tue, 09 Feb 2016, David Wright wrote:
> > 
> > > On Tue 09 Feb 2016 at 09:00:50 (-0800), Patrick Bartek wrote:
> > > > On Tue, 09 Feb 2016, Me wrote:
> > > > 
> > > > > Le lundi 08 février 2016 à 13:50 -0800, Patrick Bartek a
> > > > > écrit :
> > > > > > Perhaps in days gone by: my OS prior to Wheezy -- Fedora 12
> > > > > > -- was like that. Anything USB had to be mounted/unmounted
> > > > > > manually. What a pain.  And if you unplugged without
> > > > > > unmounting . . .  Yes, things could break. But with Wheezy
> > > > > > which I've been using for 3+ years have had no problems with
> > > > > > just plug/unplug. The only precaution is to check the drive
> > > > > > activity light isn't flickering.
> > > > > 
> > > > > Just because you didn't lose data doesn't mean it's safe. All
> > > > > systems are known to use caching, and GNOME frequently informs
> > > > > me, after having asked to unmount my key, that I shouldn't
> > > > > unplug it until it has finished to write data on it.
> > > > 
> > > > Yes, I know about caching, but on my system read/writes to
> > > > removable devices are almost instantaneous.  So, there's been
> > > > no problems. However, I did write my on udev rule to do the
> > > > mounting/unmounting, and this was after reseaching expert
> > > > advice on how to do it properly.
> > > 
> > > Apart from not pulling the plug early, what pitfalls are you
> > > avoiding with your carefully crafted udev rule?
> > 
> > In 3 years of use, I've experienced no problems.  Why does no one
> > believe me? And as far as "carefully crafted,"  I just modified a
> > rule that was designed exclusively for flash/thumb drives by
> > following the "manual."
> 
> I didn't express any disbelief. I've pulled the plug accidently on

That was a theatrical aside, not a comment directed at you specifically.

> occasion and usually find it unmounts ok so long as I haven't tried to
> use the missing device (which can be as simple as switching panes in
> mc).
>
> But I was interested in your rule because I haven't touched
> /etc/udev/rules.d/ except to clean stale entries when swapping
> NICs or optical drives. Again, you write "you should do some research
> on udev and writing rules yourself", but I prefer learning by example
> rather than trying to reinvent the wheel.

In a reply to another, I posted a link on writing such a rule.  It
gives an example.  An excellent one.  Or you could just investigate
using the utilities udisks and udisks-glue which handle automounting of
removable media.  No rules to write.

B

[toc] | [prev] | [next] | [standalone]


#164101

From<tomas@tuxteam.de>
Date2016-02-12 09:50 +0100
Message-ID<r1hAm-4wZ-7@gated-at.bofh.it>
In reply to#164070
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Feb 11, 2016 at 10:49:43AM -0800, Patrick Bartek wrote:

[...]

> In 3 years of use, I've experienced no problems.  Why does no one
> believe me?

I *do* believe what you state above. I just *strongly* recommend
against the practice you propose. Anyone is, of course, free to
use my recommendations the way (s)he sees fit.

It's as simple as that: pulling out a still mounted medium is
risky, as the OS makes no guarantees about the state of the
cache. To be really effective, your udev rules would need the
ability to peek into the future, to unmount the USB stick a tad
before you're going to pull it out.

You can, of course, reduce the risk by waiting for the system
to be long enough in a "quiescent" state, by reducing the
complexity of the whole (Rube Goldbergian desktop systems
have lots of moving parts doing lots of things which tend to
make system behaviour less predictable), but your risk won't
disappear. If you want to get rid of this risk, unmount before
pulling.

I think we've stated our opinions clearly enough. I bow out.

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

iEYEARECAAYFAla9kuQACgkQBcgs9XrR2kZIMACbBv8FkaNk8wbSHZp0d+hyFvZs
yCgAn0YdKOCMFAHcfi6LPfY5St78yyF8
=UdK/
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#164118

FromPatrick Bartek <nemommxiv@gmail.com>
Date2016-02-12 18:40 +0100
Message-ID<r1pRi-1EI-49@gated-at.bofh.it>
In reply to#164101
On Fri, 12 Feb 2016, tomas@tuxteam.de wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thu, Feb 11, 2016 at 10:49:43AM -0800, Patrick Bartek wrote:
> 
> [...]
> 
> > In 3 years of use, I've experienced no problems.  Why does no one
> > believe me?
> 
> I *do* believe what you state above. I just *strongly* recommend
> against the practice you propose. Anyone is, of course, free to
> use my recommendations the way (s)he sees fit.

My comment was a theatrical aside.  I should have put it in parentheses.

> It's as simple as that: pulling out a still mounted medium is
> risky, as the OS makes no guarantees about the state of the
> cache. To be really effective, your udev rules would need the
> ability to peek into the future, to unmount the USB stick a tad
> before you're going to pull it out.

Doesn't work like that.  The system notes FIRST through D-Bus IIRC the
drive has been removed, and then the specific rule to unmount it is
run. Yes, that doesn't seem right, but that's the way it works.

During my initial stress testing, I was able to create repeatable
situations where the drive was not unmounted when pulled.  The easiest
way to do this was while writing to the drive was in progress.  The
"fix' was just plug the drive back in, wait a few seconds, and unplug
it. It would unmount.  However, what was being copied to the drive would
not be completed, but the drive was still usable.  One time, I was able
to corrupt the drive to the point that reformatting was required as
well as a "force" unmount on the system.  

> You can, of course, reduce the risk by waiting for the system
> to be long enough in a "quiescent" state, by reducing the
> complexity of the whole (Rube Goldbergian desktop systems
> have lots of moving parts doing lots of things which tend to
> make system behaviour less predictable), but your risk won't
> disappear. If you want to get rid of this risk, unmount before
> pulling.

I may have an advantage:  I don't use a desktop/environment, just X and
a window manager.  So, I don't have all the overhead that imposes.

> I think we've stated our opinions clearly enough. I bow out.

Hope your problem with GNOME is resolved quickly.

B

[toc] | [prev] | [next] | [standalone]


#164000

FromMe <mlistsgn@gmail.com>
Date2016-02-09 19:50 +0100
Message-ID<r0lwl-7WP-3@gated-at.bofh.it>
In reply to#163997
Le mardi 09 février 2016 à 09:00 -0800, Patrick Bartek a écrit :
> Yes, I know about caching, but on my system read/writes to removable
> devices are almost instantaneous.

Maybe it's just luck ? As I said, I frequently get a message from GNOME
saying the writes are not finished, and that although the drive
disappeared from the menus, I have to let it plugged. Especially when I
write large amounts of data. Which happens frequently, because it's my
backup drive.

> However, I did write my on udev rule to do the mounting/unmounting, and
> this was after reseaching expert advice on how to do it properly.

Can you explain how your udev manages to "unmount properly" when the
drive has already been unplugged ?

Or do your rules just disable caching ? I could do that, but that
doesn't prevent some program from writing on my disk when I want to
unplug it.

I've also read that disabling caching and writing all the data instantly
can reduce the lifetime of the key, as it stresses more the memory
cells.

> 
> > Additionally, I don't have any LED on this drive, which makes it even
> > more dangerous.
> 
> Then my method won't work well for you.

It's the only thing I miss with this key. It was handy to see what my
drive was doing.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web