Device Notifier fails to safely remove USB drive Kubuntu
0
votes
0
answers
25
views
I have been using the command:
rsync -av $localdir $usbdir
to back up my local directories to NTSF formatted USB drives for years. I got a new system and now have a serious problem I am hoping someone can help with. I swap between two 2 2TB USB drives (formatted NTSF) with the idea I will always have a backup, even if one goes bad. The old computer (Kubunto 18.04.1) had no problems backing up its data and the I safely remove the drive. The new computer (Kubunto 18.04.5) backed up 64GB of data, but four hours after trying to safely remove the drive, the wheel was still spinning on the Device Notifier.
I checked and the drive was not mounted (not showing in df or in /media). I thought I could unplug the drive, as it was not mounted. That was a bad idea. The file system was corrupted and only chkdsk in Windows fixed it. All 64GB seemed to be there. But diff -rq showed differences for some directories. I deleted those, did rsync again and then the disk seemed fine.
For the second disk, I decided to rsync smaller chunks. The first chuck (17GB) no problem. The second chunk (23GB) same problems as before, though I waited five hours and after the chkdsk, folders were missing. I had 3.5GB to restore and that took a couple minutes. I did du -sh and all directories were the right size and diff -rq and all directories were the same. But trying to use the Device Notifier to safely remove the drive failed again. I couldn't even log out.
I have read that the files might not actually have been copied, but were buffered and the system needed to flush the buffer. However, I also thought once the drive was unmounted, it could be removed. When Device Notifier is displaying its wheel, nothing is using any CPU based on top).
Can someone suggest how to investigate this further. Are there some useful commands to help track down what is going on when Device Notifier is unhappy? I can't tell if it is hardware or software. And maybe how to safely remove the drive by some other method?
Thanks.
Asked by Jon Swanson
(1 rep)
May 19, 2024, 01:10 AM