1

After I click on the "unmount" icon next to the USB device in the file tree sidebar on Nautilus, the notification appears with the text "do not unplug/remove the device".

The problem is that the notification doesn't go away for several time, even if the writing process is already finished, also with that notification still visible in the right top corner I can remount the USN by clicking its name in Nautilus, use it, and unmount it.

If I copy something in the USB, the "copying files" popup process should finish only if the writing process is really completed (as it was in the previous Ubuntu versions...).

I'm using Ubuntu 22.04.1 LTS.

apt-cache policy nautilus:
nautilus:
  Installato: 1:42.2-0ubuntu1
  Candidato: 1:42.2-0ubuntu1
  Tabella versione:
 *** 1:42.2-0ubuntu1 100
        100 /var/lib/dpkg/status
     1:42.0-1ubuntu2 500
        500 http://it.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

There is a problem on my side?

How to fix that issue?

I can't wait for an hour to be safe remove it!

Thanks

  • also see: https://askubuntu.com/questions/396846/why-i-saw-the-message-dont-unplug-until-it-finished?rq=1 – Yoran Jansen Aug 24 '23 at 15:59
  • Do you see a blinking light on the USB device when writes occur? That is better indicator of the write still being flushed by the system -- the original process doing the copy may have given its last data to the system and finished, so the system flush is not even associated with that original process. – ubfan1 Aug 24 '23 at 19:37
  • @ubfan1 my usb hasn't any light... It's a shame that the system window "copying files" finished but it really not – user2342558 Aug 25 '23 at 08:56
  • 1
    Type sync in a terminal -- and wait for the return. I think that works these days. Used to just schedule the flush and return -- drove the DB guys crazy. – ubfan1 Aug 25 '23 at 16:12

1 Answers1

1

+1 for sync, suggested by @ubfan1. Wait for it to finish so that the terminal window returns to prompt.

If you want to do it fool-proof (avoid problems if an unexpected write operation would occur), you can unmount the file system(s) in the partition(s) of the USB device before unplugging it. For example

sudo umount /dev/sdx*

where x is the drive letter (for example a or b). The wild-card (*) will help you [try to] unmount all partitions, and make sure that all buffers are flushed (with sync), and then unmount. So when this command returns successfully, you can unplug the USB device.

If there is some error (that some file system will not get unmounted, please identify the cause and fix it. Some process is using it (for example a terminal window is using a directory there as its current directory).

This link and this link might be helpful to find methods to unmount 'stubborn' file systems.

sudodus
  • 46,324
  • 5
  • 88
  • 152