You are not logged in.

#1 2011-08-12 10:17:29

tasty_minerals
Member
Registered: 2011-03-30
Posts: 191

[SOLVED] Asynchronous writing to external devices

So I've noticed it long ago. In linux, writing to any external disk, somehow is different from windows os. What I mean is when I do want to copy some data to an external hdd or usb stick, the external device keeps working even when the file manager shows that the file has been copied. I can't unmount the device and always have to wait for 2-3 min or so (if the copied data is big enough). I also noticed the way copy/move progress bar behaves in linux, it runs very quickly in the beginning, and then very slowly in the end.
The bad side of all this is, when I do unmount some of my drives too soon or when I plug them off, my data can be in a mess, like some mp3's are mixed with the deleted ones and other scary stuff.
If this is some "unix" feature? Maybe the system uses swap/cache to write to a disk in some particular fashion, that when the progress bar disappears, the system is far from finishing the task. This was not a problem before, but now it starts to irritate me a lot, as more and more often I find my folders to be empty or files to be corrupted, when unplugging too soon. I understand that it is only my mistake, but can the process be more informative? How can I know when do I umount the disk. The safest way is to use command line, but sometimes I do use fm, so do the ppl who use my pc and don't have a single clue about such behaviour.
What I want to know if it is just me or somebody else noticed that?

Last edited by tasty_minerals (2011-08-12 15:11:22)


lenovo thinkpad EDGE 13'

Offline

#2 2011-08-12 10:31:57

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Asynchronous writing to external devices

Use the 'sync' mount option - but read about it in the mount man page first, as it's not recommended for some types of media.

Offline

#3 2011-08-12 11:33:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Asynchronous writing to external devices

https://bbs.archlinux.org/viewtopic.php?id=122414

Last edited by karol (2011-08-12 11:34:23)

Offline

#4 2011-08-12 12:35:34

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Asynchronous writing to external devices

No, "sync" is overkill and kills performance - the mount option you want is flush.

Offline

#5 2011-08-12 15:11:08

tasty_minerals
Member
Registered: 2011-03-30
Posts: 191

Re: [SOLVED] Asynchronous writing to external devices

thank you for your answers


lenovo thinkpad EDGE 13'

Offline

Board footer

Powered by FluxBB