You are not logged in.

#1 2007-05-23 13:15:13

ict
Member
Registered: 2007-05-01
Posts: 44

Write on USB-Stick times out

Hi

I have some problems writing big files on a USB Flashdrive. I tried copying a 180mb file to it. Drag and Drop worked instantly so I guess the write-cache kicked in and nothing was actually written on the drive yet.
So I click on the icons and choose unmount. I can see the stick is receiving data now (has a little activity-LED). After a minute or so I get the message that unmount failed because of a timeout. The LED is still flashing at this point but I can't mount the stick again (permission denied). If I remove the stick and plug it in again, the files are not there.
With 60mb files it seems to work.
So my question would be, how can I
a) increase the timeout when unmounting or
b) decrease the write-cache so the file is instantly written to the drive.

thanks in advance
ict

Offline

#2 2007-05-23 13:39:42

raymano
Member
Registered: 2006-10-13
Posts: 357
Website

Re: Write on USB-Stick times out

I don't know about the timeout but you can mount your USB key sync. By default mounts are async. Here's an example sync mount assuming your USB partition you are trying to mount is at /dev/sdb1

mount /dev/sdb1 /mnt/somedir -o sync


FaunOS: Live USB/DVD Linux Distro: http://www.faunos.com

Offline

#3 2007-05-23 14:19:36

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Write on USB-Stick times out

You can also try to execute sync in terminal before unmounting, that should force all write caches to be written to their devices.

Offline

#4 2007-05-23 17:41:51

ict
Member
Registered: 2007-05-01
Posts: 44

Re: Write on USB-Stick times out

Sync seems to be the best solution. Thanks!

Offline

#5 2007-05-24 15:07:39

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Write on USB-Stick times out

If you have vfat (fat32) type partition on this usb stick you can also use "flush" for mount option. It works as fast as async and is much safer (it doesn't keep files in the cache).

Offline

Board footer

Powered by FluxBB