I don’t know if it’s my particular USB drive (Patriot brand), but whenever I want to remove it from the phone, I get the message “Unable to stop drive.” This happens whether or not I’m copying any files at the time.
Eject also doesn’t remove it from the Files menu, although no error is displayed.
I then go to the Disks app, select the drive, and power it off from the settings.
I don’t have another USB-C type drive to test, unfortunately.
I also don’t have any problems removing the drive from my laptop.
This one should work I think, but also path to the folder where it’s mounted should also work. And the second command should AFAIK act on the mounted path.
It’s generally a good idea to use sudo umount --recursive -f $PATH, but I doubt something is getting auto-mounted inside the flash drive.
Try the following:
sudo -i
lsof | grep /media/purism/PATRIOT
It should tell you want is using it. Little hint, when you are sitting in the path you want to unmount, $$ (your shell) is using it.
Try cd /media/purism && sudo umount -f /media/purism/PATRIOT
Of course it is busy. You are inside the mount folder (with the bash shell). Just issue a plain
cd
(this will take you to /home/purism) and then
umount /media/purism/PATRIOT
If it insists that it is busy then another app is accessing the folder.
lsof /dev/sdb
should tell you which one it is. You first exit that app and then umount.
This definitely unmounts it, as seen in the Disks app, so that’s good to know. It stays in the menu, however, and when I select it in the Files app, a notification pops down and says it’s now ready to open.
Selecting Safely remove drive gets the Unable to stop drive message. Back to Disks, where it shows as mounted again.
So looks like I have to issue the command every time (at least with this drive).
Yes, Files app will mount USB Drive again (by selecting it). Make sure you are at Home Folder or close Files app. And check this with umount /dev/sdb1 again.
P.S. I’d format this USB drive on Librem 5 itself to ext4.
Yes, I had done this. I also closed and reopened Disks again after that, and it still showed as mounted. When I run the command, it unmounts it, no problem.
I will reformat the USB at some point. Then I’ll report back to say whether that corrected the behavior.
Thanks for all the tips!
I just noticed that Eject (in the Files app) actually unmounted the drive, so… maybe I don’t need to do it in the terminal. I’ll continue to check it in the meantime.