• is unmounting external USB hard drive the same as ejecting?

    From Johnston@21:1/5 to All on Fri Nov 19 09:38:45 2021
    I often use external USB hard drives with Ubuntu, but I've always
    wondered if unmounting is the same as ejecting? The reason I ask is
    that, sometimes I forget the drive is plugged in on the desktop and when
    I boot up, it is there of course but only the unmounting option is
    present, eject never is unless I plug in the drive after Ubuntu is
    already active.

    Up until now, if I see that only unmounting is offered, I never unplug
    the drive, just shut down and then USB unplug. I'm not sure it is safe
    to unplug the drive after unmounting because I see that the drive LED is
    still on, unlike ejecting where it goes from steady to blinking.

    Thank you.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Fri Nov 19 19:02:17 2021
    Am Fri, 19 Nov 2021 09:38:45 -0500
    schrieb Johnston <jj4509@aols.net>:

    I often use external USB hard drives with Ubuntu, but I've always
    wondered if unmounting is the same as ejecting? The reason I ask is
    that, sometimes I forget the drive is plugged in on the desktop and
    when I boot up, it is there of course but only the unmounting option
    is present, eject never is unless I plug in the drive after Ubuntu is
    already active.

    Up until now, if I see that only unmounting is offered, I never
    unplug the drive, just shut down and then USB unplug. I'm not sure
    it is safe to unplug the drive after unmounting because I see that
    the drive LED is still on, unlike ejecting where it goes from steady
    to blinking.

    It is not the same.
    unmount only unmounts the partition, eject unmounts all partitions and
    ejects the USB device.
    You can't mount the partitions directly after that.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johnston@21:1/5 to Marco Moock on Sat Nov 20 09:00:51 2021
    On 11/19/21 1:02 PM, Marco Moock wrote:
    Am Fri, 19 Nov 2021 09:38:45 -0500
    schrieb Johnston <jj4509@aols.net>:

    I often use external USB hard drives with Ubuntu, but I've always
    wondered if unmounting is the same as ejecting? The reason I ask is
    that, sometimes I forget the drive is plugged in on the desktop and
    when I boot up, it is there of course but only the unmounting option
    is present, eject never is unless I plug in the drive after Ubuntu is
    already active.

    Up until now, if I see that only unmounting is offered, I never
    unplug the drive, just shut down and then USB unplug. I'm not sure
    it is safe to unplug the drive after unmounting because I see that
    the drive LED is still on, unlike ejecting where it goes from steady
    to blinking.

    It is not the same.
    unmount only unmounts the partition, eject unmounts all partitions and
    ejects the USB device.
    You can't mount the partitions directly after that.

    So, is there any way around it other than powering off if I already had
    the USB drive plugged in? Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or not?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Sat Nov 20 15:48:28 2021
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in? Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johnston@21:1/5 to Marco Moock on Sat Nov 20 10:42:03 2021
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in? Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove" option available at all times, not just if I plug in the drive after boot up?
    Right now, the option is only offered if I plug in the USB drive while
    Ubuntu is active.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to Johnston on Sat Nov 20 08:52:07 2021
    On 11/20/2021 7:42 AM, Johnston wrote:
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in?  Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove" option available at all times, not just if I plug in the drive after boot up?
    Right now, the option is only offered if I plug in the USB drive while
    Ubuntu is active.

    My understanding is that once the drive is unmounted, it's fully synced.
    Since USB can be pulled at any time, it should be OK to remove.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johnston@21:1/5 to red floyd on Sat Nov 20 12:20:10 2021
    On 11/20/21 11:52 AM, red floyd wrote:
    On 11/20/2021 7:42 AM, Johnston wrote:
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in?  Can I modify something so that "safely >>>> remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove"
    option available at all times, not just if I plug in the drive after
    boot up? Right now, the option is only offered if I plug in the USB
    drive while Ubuntu is active.

    My understanding is that once the drive is unmounted, it's fully synced. Since USB can be pulled at any time, it should be OK to remove.


    Not in my experience. If I unmount and disconnect USB, there are often
    drive errors when active again. Only "safely remove" seems to fully disconnect it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Sat Nov 20 18:16:27 2021
    Am Sat, 20 Nov 2021 08:52:07 -0800
    schrieb red floyd <no.spam.here@its.invalid>:

    My understanding is that once the drive is unmounted, it's fully
    synced. Since USB can be pulled at any time, it should be OK to
    remove.

    Check the mount options. Maybe it is mounted with the sync option if
    you plug it in after the bootup.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Easter@21:1/5 to Johnston on Sat Nov 20 09:30:10 2021
    Johnston wrote:
    I'm not sure it is safe to unplug the drive after unmounting because I
    see that the drive LED is still on, unlike ejecting where it goes from
    steady to blinking.

    I did some reading about commands to eject, where I also found a command
    to power off the usb drive.

    This thread starts 9 y ago and goes on to include Ub 20.04 in Mar.

    https://superuser.com/questions/504256/how-can-i-safely-remove-my-usb-hard-drive-in-fedora-17
    How can I safely remove my USB hard drive in Fedora 17?

    --
    Mike Easter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Aragorn@21:1/5 to All on Sat Nov 20 23:46:53 2021
    On 20.11.2021 at 08:52, red floyd scribbled:

    On 11/20/2021 7:42 AM, Johnston wrote:
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I
    already had the USB drive plugged in?  Can I modify something so
    that "safely remove" shows up whether the drive was already
    plugged in at boot or not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if
    you just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove"
    option available at all times, not just if I plug in the drive
    after boot up? Right now, the option is only offered if I plug in
    the USB drive while Ubuntu is active.

    My understanding is that once the drive is unmounted, it's fully
    synced. Since USB can be pulled at any time, it should be OK to
    remove.

    Not necessarily. One of the default mount options for volumes on HDDs
    and SATAs is "async". This means that when you issue the "umount",
    there may still be data waiting in the various buffers, from RAM
    to the device's own buffer.

    The "eject" command makes sure the buffers are flushed. "umount" in
    and of itself doesn't do that.

    --
    With respect,
    = Aragorn =

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From red floyd@21:1/5 to Aragorn on Sat Nov 20 17:41:05 2021
    On 11/20/2021 2:46 PM, Aragorn wrote:
    On 20.11.2021 at 08:52, red floyd scribbled:

    On 11/20/2021 7:42 AM, Johnston wrote:
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I
    already had the USB drive plugged in?  Can I modify something so
    that "safely remove" shows up whether the drive was already
    plugged in at boot or not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if
    you just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove"
    option available at all times, not just if I plug in the drive
    after boot up? Right now, the option is only offered if I plug in
    the USB drive while Ubuntu is active.

    My understanding is that once the drive is unmounted, it's fully
    synced. Since USB can be pulled at any time, it should be OK to
    remove.

    Not necessarily. One of the default mount options for volumes on HDDs
    and SATAs is "async". This means that when you issue the "umount",
    there may still be data waiting in the various buffers, from RAM
    to the device's own buffer.

    The "eject" command makes sure the buffers are flushed. "umount" in
    and of itself doesn't do that.


    Ah, I was not aware of that. Thanks. I'm stuck in the old days, mentally.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gordon@21:1/5 to Johnston on Sun Nov 21 03:03:36 2021
    On 2021-11-20, Johnston <jj4509@aols.net> wrote:
    On 11/20/21 9:48 AM, Marco Moock wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in? Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.


    What I'm asking is if it is possible to have the "safely remove" option available at all times, not just if I plug in the drive after boot up?
    Right now, the option is only offered if I plug in the USB drive while
    Ubuntu is active.

    The USB drive is safely removed until it is either plugged in or mounted
    during booting, as it is not connected to the file system.

    If the drive, all partitions, are not mounted then unplugging the drive is okay.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gordon@21:1/5 to Marco Moock on Sun Nov 21 02:57:53 2021
    On 2021-11-20, Marco Moock <mo01@posteo.de> wrote:
    Am Sat, 20 Nov 2021 09:00:51 -0500
    schrieb Johnston <jj4509@aols.net>:

    So, is there any way around it other than powering off if I already
    had the USB drive plugged in? Can I modify something so that "safely
    remove" shows up whether the drive was already plugged in at boot or
    not?

    I don't know what you exactly like to do.
    Only use eject if you like to unplug the USB drive. Use unmount if you
    just like to unmount the specific partition.

    Keep in mind, the USB drive may have only partition on it.

    In which case unmounting will allow one to disconnect it physically. (Pull
    the plug).

    To my mind using the word eject is not the best word. When it applied to CD
    it made sense.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Marco Moock on Sun Nov 21 12:31:26 2021
    Marco Moock <mo01@posteo.de> writes:
    Am Sat, 20 Nov 2021 08:52:07 -0800
    schrieb red floyd <no.spam.here@its.invalid>:

    My understanding is that once the drive is unmounted, it's fully
    synced. Since USB can be pulled at any time, it should be OK to
    remove.

    Check the mount options. Maybe it is mounted with the sync option if
    you plug it in after the bootup.

    The sync option (and its opposite, the async option) are primarily
    concerned with the speed vs. crash consistency balance during ordinary operations. Asynchronous writes improve speed at the cost of possibly
    losing some or all of the data on the file system upon a crash (with
    some file systems being nicer wrt the loss than others, but last I
    looked in the Linux documentation, I found guarantees only for
    NILFS2).

    Synchronously written file systems are supposedly safe against
    corruption (at the cost of much slower writes), so you could
    theoretically unplug the USB stick without umounting it first, but:

    * Hardly anybody mounts file systems synchronously, so this is tested
    rarely, and therefore has a chance of being buggy.

    * The block device (e.g. USB stick) itself may itself perform writes
    asynchronously without the file system taking notice.

    In practice I umount the (asynchronously mounted) USB stick, wait some
    seconds, then unplug it. Some sticks has a light that blinks when
    writes are happening; in that case I wait until the drive has stopped
    blinking. I have also seen sticks turn the light on on mounting and
    off after umounting when it's safe to eject (but I have also seen
    sticks where the light continued to be turned on after umounting;
    maybe I will try "eject" next time).

    - anton
    --
    M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)