You are not logged in.
Hi,
when i write files to a mounted usb flash drive with thunar unmounting needs a lot of time, sometimes 30 minutes. This happens when i mount the drive using Thunar or when i mount it using 'sudo mount'. When i don't start Thunar and using only the terminal for mounting, writing files and unmounting its no problems. Happens with all file systems (ntfs, ntrfs, ext4). When i check
lsof -t /dev/sd*
there is no process doing anything with the flash drive. There is also no problem when i use the Nemo file manager.
What is the problem?
Offline
is it plugged into a USB 1.0 only port? at USB 1.0 speeds a huge buffer of storage device writes could take that long. try reading the whole device, which would be even longer (but safely killable). in a terminal, if this is /dev/sdz:
time dd bs=1024 of=/dev/null if=/dev/sdz
this could take all day for a 64GB device in a USB 1.0 only port. then compare in a 3.0 port (if you have one with a blue tab). or limit the command like:
time dd bs=1024 count=1024 of=/dev/null if=/dev/sdz
Offline
No, its USB 2.0 or USB 3.0. Its not a problem with the flash drive, i've tested multiple devices. It works when i mount the drive with nemo or when i try it on ubuntu mate with caja file manager.
try reading the whole device
What is that supposed to help? As i said, the problem is not the flash drive.
Offline
@Friedrich, interesting that you are getting the same delay with thunar as well as the mount command.
Try to see if you can get any log files for the time the drive is unmounting. Look at either:
Your journal:
journalctl -f
...then start the unmount process
.
In ~/.xsession-errors
.
Quit the thunar daemon and run thunar from the command line:
thunar -q && thunar
...and start the unmount process.
As you are probably aware, there might be a short delay if a lot of data is being written, but it should never be 30 minutes of delay.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
if you have a drive with an activity light, using it may help show what is happening. things you have described are very much like a lot of write output (or modified memory mapped pages) is buffered in memory. file system writes sometimes get buffered while the drive goes inactive. but they will get written during sync which a kernel umount() call will do. the very long times could be explained by a very slow device that has accumulated a large buffer. i would try the command "time sync;time sync;time sync" to see how long that takes, before unmounting. reading a large amount of data from the device could also show if speed is an issue.
that all said, there could be some other issue. but speed is the more obvious suspect (it really happens a lot though 30 minutes is extreme) and needs to be ruled out before other things can be revealed. a lot of this gets tested with commands. having a 2nd terminal open in the same workspace (because switching workspace involves a lot of things happening that could freeze up) can help by being able try other commands while one (such as umount) is frozen.
possibilities include a high USB error rate due to bad or dirty contacts. and if you are a CBer or ham radio operator, be sure all nearby transmitters are off (a USB dongle is also a UHF antenna). Thunar is just an app that can cause a lot of writing, typically to update inode metadata for times a file was last read (try the "noatime" option if you doing mount by a command, to disable this).
Offline
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 532.77 KiB (Peak: 533.61 KiB) ]