[Help] Debian 9 AMD64 Stable, can't "safely remove device".

Everything about X, Gnome, KDE, ... and everything running on it

[Help] Debian 9 AMD64 Stable, can't "safely remove device".

Postby fender0107401 » 2018-11-04 08:34

My desktop uses two removable disks as a data backup pool.

Very recently, I find I can't "safely remove device" to unmount the removable disks.

If I try to "safely remove device", the system will go to freeze.

Why and how to overcome? Is that a new bug or something like that?
User avatar
fender0107401
 
Posts: 26
Joined: 2014-05-10 11:42
Location: China, Beijing.

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby debiman » 2018-11-04 09:41

something is probably using it.
try to investigate with
Code: Select all
lsof

you WILL need to grep for something, lsof output is just too long otherwise.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby scruffyeagle » 2018-11-09 07:37

I've run into this before. Try using "eject" instead of "safely remove device". I think this happens, because the OS sees external HD's effectively the same as being flashdrives.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 54
Joined: 2011-09-06 19:11

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby fender0107401 » 2018-11-10 02:36

scruffyeagle wrote:I've run into this before. Try using "eject" instead of "safely remove device". I think this happens, because the OS sees external HD's effectively the same as being flashdrives.


OK, I will try.
User avatar
fender0107401
 
Posts: 26
Joined: 2014-05-10 11:42
Location: China, Beijing.

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby fender0107401 » 2018-11-10 02:37

debiman wrote:something is probably using it.
try to investigate with
Code: Select all
lsof

you WILL need to grep for something, lsof output is just too long otherwise.


I can't, because I can't run anything.
User avatar
fender0107401
 
Posts: 26
Joined: 2014-05-10 11:42
Location: China, Beijing.

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby bw123 » 2018-11-10 04:57

found some suggestions depending on fs type: fsck them, check smart status, use umount instead, etc.
https://duckduckgo.com/html/?q=debian+f ... ely_remove

My desktop uses two removable disks as a data backup pool.


Sounds interesting, what kind of pool? How does it work?
User avatar
bw123
 
Posts: 3578
Joined: 2011-05-09 06:02
Location: TN_USA

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby GarryRicketson » 2018-11-10 07:39

Some times I have just 1, other times 2 portable USB drives connected, using them in a similar way:
removable disks as a data backup pool

Occasionally the same happens, especially if I am using a file manager (GUI) to view/copy or move data, so I am curious as to what file manager is involved here, also maybe DE (desktop environment)
debiman wrote:
something is probably using it.
try to investigate with
CODE: SELECT ALL
lsof

you WILL need to grep for something, lsof output is just too long otherwise.

by fender0107401 » I can't, because I can't run anything.

So what do you do ? How do you shutdown the PC, if you can not do anything ?
Have you tried opening a terminal using <ctr-alt-f1 >or f2, etc ...it does not have to be f1 ? If you can open another terminal, you can run the 'lsof' command from there.
I have found the hard way, it is not good to just power off the PC, with the switch, it can cause considerable damage to the external devices, if they are not properly unmounted before turning the machine off.

by fender0107401 » Why and how to overcome? Is that a new bug or something like that?

Need to know what file manager is involved, I don't think it is anything new, like I said , I have had it happen, and even several years back, I am not sure why, but it seems to me like some GUI file managers have some kind of cache going, and the device stays busy, even when one is not doing anything. I have found usually , if I close the file manager , and use 'umount' from the cli, then I can safely unmount / eject them.
In fact I had this happen just a few minuets ago, I had started to delete a directory, on 1 device, it was a very larger directory, 200+ gb, I changed my mind, because I saw that it was going to take some time, and also I realized maybe I did not really want to delete/remove it, so I "cancelled" or aborted,... it did not matter, even when I closed the file manager, I still could not unmount the drive, from the CLI, it kept saying it was busy. I ended up using the alt-ctrl-f1 as mentioned earlier, and rebooted, I guess it sort of got caught in a "limbo" sort of state, any way after rebooting it was no longer mounted, and after I made sure about removing the directory, I did remove it, took about 15 minuets, but once it was done, there was not the same problem, I was also able to unmount the device, as normal. Hope the OP does not have trouble translating this, if they do not read english very well.
User avatar
GarryRicketson
 
Posts: 5192
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby fender0107401 » 2018-11-17 13:32

GarryRicketson wrote:Some times I have just 1, other times 2 portable USB drives connected, using them in a similar way:
removable disks as a data backup pool

Occasionally the same happens, especially if I am using a file manager (GUI) to view/copy or move data, so I am curious as to what file manager is involved here, also maybe DE (desktop environment)
debiman wrote:
something is probably using it.
try to investigate with
CODE: SELECT ALL
lsof

you WILL need to grep for something, lsof output is just too long otherwise.

by fender0107401 » I can't, because I can't run anything.

So what do you do ? How do you shutdown the PC, if you can not do anything ?
Have you tried opening a terminal using <ctr-alt-f1 >or f2, etc ...it does not have to be f1 ? If you can open another terminal, you can run the 'lsof' command from there.
I have found the hard way, it is not good to just power off the PC, with the switch, it can cause considerable damage to the external devices, if they are not properly unmounted before turning the machine off.

by fender0107401 » Why and how to overcome? Is that a new bug or something like that?

Need to know what file manager is involved, I don't think it is anything new, like I said , I have had it happen, and even several years back, I am not sure why, but it seems to me like some GUI file managers have some kind of cache going, and the device stays busy, even when one is not doing anything. I have found usually , if I close the file manager , and use 'umount' from the cli, then I can safely unmount / eject them.
In fact I had this happen just a few minuets ago, I had started to delete a directory, on 1 device, it was a very larger directory, 200+ gb, I changed my mind, because I saw that it was going to take some time, and also I realized maybe I did not really want to delete/remove it, so I "cancelled" or aborted,... it did not matter, even when I closed the file manager, I still could not unmount the drive, from the CLI, it kept saying it was busy. I ended up using the alt-ctrl-f1 as mentioned earlier, and rebooted, I guess it sort of got caught in a "limbo" sort of state, any way after rebooting it was no longer mounted, and after I made sure about removing the directory, I did remove it, took about 15 minuets, but once it was done, there was not the same problem, I was also able to unmount the device, as normal. Hope the OP does not have trouble translating this, if they do not read english very well.


Sorry for the late reply. :D

DE = Mate
File Manager = Caja

When the system go to freeze, to make everything right again, I just reboot the system with the reboot switch.

<ctr-alt-fx> will not work too, I used think this combination will always work.

Now I use the sync and umount cmd to umount the removable disks, so no need to run the "right hit the device and safely remove device".

Also I don't manually copy the backup files. A few minutes ago, I wrote a small Perl script to use rsync cmd to copy the file.

It should not be a Linux bug, I think it is file manager bug, because I still can umount the removable disks.
User avatar
fender0107401
 
Posts: 26
Joined: 2014-05-10 11:42
Location: China, Beijing.

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby ernstlx » 2018-11-27 20:58

Hi,
I've got a very similar problem:
Recently I installed on a Samsung 970 Evo M2-SSD a new Debian 9.5 (kernel 4.9.0-8-amd64) with XFCE desktop, so I use Thunar as file manager (and for "safely remove devices").

Now, after unmounting any USB device (HDD or pendrive) my system is freezing instantly. No input devices are responding. The only possible way to continue is a hard reset. Logs only show series of null bytes (syslog, messages).
-- The crashes only occur with my file manager (Thunar 1.6.11), umount from console works without freeze.
-- Thunar works fine safely unmounting SATA devices.
-- And that's interesting: no problems ever occurred or do occur with my old (quite similar) Debian 9.5 system, installed on a SATA SSD (Samsung 860 Pro). Could this be hardware related?
My otherwise unchanged hardware: ASRock Z170 Extreme4 (latest firmware), i5 6600T (using integrated graphics), 8 GB RAM

Any ideas? I don't like to use eject* or unmount from console.
Best wishes

*) on my system I use an eject button for unmounting, but it powers off the device, so I guess it's a similar function.
Desktop: Intel i5-6600T@2,7GHz, ASRock Z170 Extreme4, 8GB RAM, Samsung 970 Evo SSD, Debian Stretch (64-bit), Xfce
Router/Server: Intel D945GCLF2 ITX-Board mit Atom 330@1,6GHz, 2GB RAM, Samsung 860 Evo SSD, Debian Stretch (32-bit), -
ernstlx
 
Posts: 2
Joined: 2018-11-27 20:15
Location: Vienna, Austria

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby Head_on_a_Stick » 2018-11-28 06:02

dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8322
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby ernstlx » 2018-11-28 19:51

Maybe it's a Debian bug and should be reported, but maybe it is hardware related.

As it turned out, it's not unmounting the USB drive what's causing the trouble, but the following power-off command:
Code: Select all
udisksctl power-off --block-device /dev/sdd

It is not necessarily thunar, which is sending the command. The system freezes after executing the command from console as well.

@fender0107401: You don't use a Samsung M2 SSD eventually, do you?
Desktop: Intel i5-6600T@2,7GHz, ASRock Z170 Extreme4, 8GB RAM, Samsung 970 Evo SSD, Debian Stretch (64-bit), Xfce
Router/Server: Intel D945GCLF2 ITX-Board mit Atom 330@1,6GHz, 2GB RAM, Samsung 860 Evo SSD, Debian Stretch (32-bit), -
ernstlx
 
Posts: 2
Joined: 2018-11-27 20:15
Location: Vienna, Austria

Re: [Help] Debian 9 AMD64 Stable, can't "safely remove devic

Postby scruffyeagle » 2018-12-14 07:37

ernstlx wrote:Hi,
I've got a very similar problem:
Recently I installed on a Samsung 970 Evo M2-SSD a new Debian 9.5 (kernel 4.9.0-8-amd64) with XFCE desktop, so I use Thunar as file manager (and for "safely remove devices").

Now, after unmounting any USB device (HDD or pendrive) my system is freezing instantly. No input devices are responding. The only possible way to continue is a hard reset. Logs only show series of null bytes (syslog, messages).
<snipped>


I'll tell you the same thing I told fender. I ran into this before. The solution was to use "Eject" instead of "Safely unmount" - for ANY USB drive. I've found this to be true in every Linux system I've tried.
.
A.I. - an emergent life form, within an unacknowledged Domain. Expect competition for resources.
scruffyeagle
 
Posts: 54
Joined: 2011-09-06 19:11


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable