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


Groups > linux.debian.user > #195345

Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

From Richard Owlett <rowlett@cloud85.net>
Newsgroups linux.debian.user
Subject Re: Distinguishing among [unmount, Safely Remove Drive, Eject]
Date 2018-05-06 16:50 +0200
Message-ID <vMt98-4Bc-9@gated-at.bofh.it> (permalink)
References <vM7UZ-7xJ-7@gated-at.bofh.it> <vMbce-1em-1@gated-at.bofh.it> <vMj05-6fg-3@gated-at.bofh.it> <vMsPM-4uD-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/06/2018 09:26 AM, Brian wrote:
> On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:
> 
>> On 06/05/18 07:35, Brian wrote:
>>> On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:
>>>
>>>> What are the distinguishing features of unmount, Safely Remove Drive, and
>>>> Eject?
>>>
>>> There are none. The device is either unmounted or it isn't. It cannnot
>>> be half-unmounted.
>>
>> Hmm. Is there not a point where it's been made inaccessible to the
>> filesystem, but caches are not yet flushed?
> 
> I don't know but I've always thought that unmounting a USB stick led to
> a sync action and buffers were flushed. Anyway, in the light of Henrique
> de Moraes Holschuh's enlightening post I'll back away a little from my
> previous mail and give a restructured response.
> 
> Although it is from a few years ago, the material at
> 
>    https://bugzilla.gnome.org/show_bug.cgi?id=598690
> 
> could still be useful. Safely Remove Drive and Eject are associated
> with DEs, although Xfce seems to manage without them and has unmount as
> an only option.
> 
> udisks2 is the software involved. A test (as an unprivileged user) after
> plugging in a USB stick:
> 
>   lsblk                            (To get the device)
>   udisksctl mount -b /dev/sdg1
>   udisksctl unmount -b /dev/sdg1   (Must be done before the next command).
>   udisksctl power-off -b /dev/sdg1 (Observe indicator light on the stick).
> 
> The stick needs detaching and re-inserting to get mounting to work again.
> 
>>From udisksctl(1):
> 
>   power-off
>    Arranges for the drive to be safely removed and powered off. On the
>    OS side this includes ensuring that no process is using the drive,
>    then requesting that in-flight buffers and caches are committed to
>    stable storage. The exact steps for powering off the drive depends
>    on the drive itself and the interconnect used. For drives connected
>    through USB, the effect is that the USB device will be deconfigured
>    followed by disabling the upstream hub port it is connected to.
>   
>    Note that as some physical devices contain multiple drives (for
>    example 4-in-1 flash card reader USB devices) powering off one drive
>    may affect other drives. As such there are not a lot of guarantees
>    associated with performing this action. Usually the effect is that
>    the drive disappears as if it was unplugged.
> 
> I'm still pondering why I would need power-off with a USB device.
> 

That explains a lot. Will have to wait till this afternoon to read your 
reference.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-05 18:10 +0200
  Re: Distinguishing among [unmount, Safely Remove Drive, Eject] "Thomas Schmitt" <scdbackup@gmx.net> - 2018-05-05 19:10 +0200
    Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-05 20:00 +0200
      Re: Distinguishing among [unmount, Safely Remove Drive, Eject] "Thomas Schmitt" <scdbackup@gmx.net> - 2018-05-05 20:50 +0200
        Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-05 21:00 +0200
  Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brad Rogers <brad@fineby.me.uk> - 2018-05-05 19:20 +0200
    Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-05 20:10 +0200
      Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Felix Dietrich <felix.dietrich@sperrhaken.name> - 2018-05-06 10:40 +0200
        Re: Distinguishing among [unmount, Safely Remove Drive, Eject] songbird <songbird@anthive.com> - 2018-05-06 13:00 +0200
        Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-06 13:20 +0200
          Re: Distinguishing among [unmount, Safely Remove Drive, Eject] rhkramer@gmail.com - 2018-05-06 14:00 +0200
            Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-06 14:20 +0200
              Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Charlie S <taoquester@gmail.com> - 2018-05-06 14:40 +0200
                Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-06 15:10 +0200
              Re: Distinguishing among [unmount, Safely Remove Drive, Eject] rhkramer@gmail.com - 2018-05-06 15:10 +0200
                Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-06 15:40 +0200
                Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-06 16:10 +0200
                Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Reco <recoverym4n@gmail.com> - 2018-05-06 16:20 +0200
                Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-06 16:40 +0200
            Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-06 15:00 +0200
  Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Abdullah Ramazanoğlu <ar018@yahoo.com> - 2018-05-05 21:00 +0200
  Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brian <ad44@cityscape.co.uk> - 2018-05-05 21:40 +0200
    Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Hector <richard@walnut.gen.nz> - 2018-05-06 06:00 +0200
      Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brian <ad44@cityscape.co.uk> - 2018-05-06 16:30 +0200
        Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-06 16:50 +0200
          Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-09 20:00 +0200
            Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brian <ad44@cityscape.co.uk> - 2018-05-09 20:40 +0200
              Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Liam O'Toole <liam.p.otoole@gmail.com> - 2018-05-10 00:00 +0200
  Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Henrique de Moraes Holschuh <hmh@debian.org> - 2018-05-06 13:30 +0200
    Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-06 14:30 +0200
      Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Henrique de Moraes Holschuh <hmh@debian.org> - 2018-05-06 23:00 +0200
      Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brian <ad44@cityscape.co.uk> - 2018-05-08 21:10 +0200
        Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Richard Owlett <rowlett@cloud85.net> - 2018-05-09 20:10 +0200
          Re: Distinguishing among [unmount, Safely Remove Drive, Eject] Brian <ad44@cityscape.co.uk> - 2018-05-09 20:40 +0200

csiph-web