LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 02-14-2007, 04:06 PM   #1
ArchNGEL
Member
 
Registered: Apr 2003
Location: Hungary
Distribution: Fedora Core 6 (2.6.18)
Posts: 61

Rep: Reputation: 15
Howto turn off USB buffer?


Hello,

I'd like to find out how to turn of USB buffer in Linux, but I find no answer either on google or here. It's not an option for USB HDs that they get actualized when I unmount them.

Thanks,
A.
 
Old 02-14-2007, 05:32 PM   #2
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,262

Rep: Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561
Maybe you are thinking of using the "sync" mount option, so that all IO is done synchronously.
This may degrade performance. Also, don't use this option for flash drives. It might shorten their lifespan.
 
Old 02-14-2007, 11:40 PM   #3
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You can stick with async, but type sync before you unmount the drive.
 
Old 02-15-2007, 02:23 PM   #4
ArchNGEL
Member
 
Registered: Apr 2003
Location: Hungary
Distribution: Fedora Core 6 (2.6.18)
Posts: 61

Original Poster
Rep: Reputation: 15
Thank you for you quick replies.

I'd be sad, if 'sync' was the only option for a "bufferless" USB disk. Sync makes the device way too slow. I'm thinking of a Windows way of handling the problem.
There I could choose not to buffer the data, but flush it immediately.

How would unmounting with sync help Linux to flush the data immediately without storing it in memory?

I intend to buy a USB/Firewire external HDD, and I really don't want my linux to keep files in the memory if I copy something. Also 'sync' is out of the question, because its slow.

I don't know if firewire drivers have this "optionless state" since I have no device to test it with.
 
Old 02-15-2007, 05:41 PM   #5
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Linux buffers and cache data, so you can not get around these issues especially for SCSI devices. Again before you unmount type sync to force dumping the data to the storage medium.

Another way is to use floppy utilities in Linux. It should not buffer or cache the data.

I normally use the following to mount and unmount USB storage devices.
mount -t vfat -o rw,umask=000,async,quiet /dev/sda1 /mnt/usbdisk

sync && umount /mnt/usbdisk && echo "It is now safe to remove the USB drive (/dev/sda)!!!"

I do not include the echo command in my commands, but for most people they feel a lot happier when see human readable text.

Though, I do not know why you are making a lot of fuss over this issue.
 
Old 02-17-2007, 03:54 AM   #6
ArchNGEL
Member
 
Registered: Apr 2003
Location: Hungary
Distribution: Fedora Core 6 (2.6.18)
Posts: 61

Original Poster
Rep: Reputation: 15
You're gonna tell me if I'm wrong or paranoid about that, but

Having a huge external HDD that is not up-to-date, and then
- having system failure, because once in a millenia it happens, could disappear a whole movie buffered in memory. Or worse, only parts of it, which I might never even realize.
- having shut down quickly, but then it starts flushing the data.
What would it do with an external DVD-RW device?

Doesn't sound very promising. You might say that 1-2 GBs should be flushed to disk very quickly. And indeed, it is rather a mental thing.

But you say it's OK, so I go for it. Thank you for your answers!

Last edited by ArchNGEL; 02-17-2007 at 05:43 AM.
 
  


Reply

Tags
buffer, external, hdd, sync, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C, howto read binary file into buffer Scrag Programming 22 01-15-2010 04:06 AM
[SOLVED] Howto turn off banners (ads) druuna LQ Suggestions & Feedback 4 07-16-2006 01:28 AM
What is the difference between the free buffer and buffer in the buffer hash queue? Swagata Linux - Enterprise 0 05-25-2006 11:57 PM
howto disable/correct frame buffer? Distorts boot screen... BroX Debian 3 08-16-2004 03:02 AM
Howto Turn of X messages when logging out of KDE lacerto Linux - General 0 06-23-2004 01:12 PM


All times are GMT -5. The time now is 05:34 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration