Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a USB flash drive (Creative Nomad Muvo 128). In WinXP when I write to the drive it happens right away but in Linux files are not actually copied to the drive until I unmount it. Since it is on USB 1.1 this can take quite a few minutes if I change alot of the data on the drive. Is there anyway to disable the caching of data so that it writes to the drive as soon as I copy files to it?
I am using SuSE 8.2. Is there any other information needed?
output from 'mount':
/dev/sda1 on /media/sda1 type vfat (rw,nosuid,nodev,user=pandasuit)
i'll check into this as i would like to do the same thing
check the man page on mount
any documentation on usb in /usr/doc
what you are trying to do is turn off caching to the usb disk..
windows actually does it too to some extent.. if you write to a drive and remove it in win or lin, you will generally not have the data you just wrote
_______________________
if you get a tinfoil gumwrapper stuck in the end of you usb drive it will make computers shut off when you insert it, and then create a 6.2 gig file on a 128 mg drive...
I noticed that in Win2k even if I wait for the writing to finish (and it is actually writing to the device right away) if I remove the device without first telling Win2k to "stop the device" none of the new data will be on it when I plug it into something else. On XP this is not a problem as it will auto-stop the device (I guess this is synonymous with automatic clean unmount). I have actually never seen WinXP wait before writing things to the device...but frequent read accesses to the same file become quicker leading me to believe there is some caching going on.
One difference I noticed right away between Win and Lin is that in Win the device is still accessible during a write much like a HD while in Lin I am unable to even list files on the device while data is being written to it.
Distribution: PCLinuxOS 0.93 and 0.92, Vector sometimes
Posts: 825
Rep:
I noticed this effect, until I used my usb drive on Mandrake 9.2 It definitely doesn't cache, but 9.1 does. I have no idea why. I haven't tried with SuSE 9.0 yet.
that should save another night of searching, someone please post if this works for them.. mount man page (read 150 times missed synch option 149 times)...
miaviator278: You probably know this...but: type "/" then "synch" while reading a man page to search for that term. Of course the real issue (the one I didnt have solved) was which term to look for. So thx to michaelk for pointing it out.
" -o Options are specified with a -o flag followed by a comma separated string
of options. Some of these options are only useful when they appear in the
/etc/fstab file. The following options apply to any file system that is
being mounted (but not every file system actually honors them - e.g., the
sync option today has effect only for ext2, ext3 and ufs):"
The last sentence tells me that synch won't work unless I reformat my drive. I guess I will have to make sure I umount it first. Since I use my drive for both linux and windows, I don't want to make it an ext2 (or other compatable for syncing) system.
yes i noticed that for my vfat usb drive, that i use to download from the windoze computers that i can use to get on the net (i don't have an option here, it's use MS computer or don't get on the net, military crap).. so i hope it's not the actual kernel level usb mass storage driver, if anyone else has any insight please post it..
pandasuit
did this work for you?
and yes, i tried searching for cache, caching, etc. and did not find synch...
I just tried it. It will mount with synch as an active option (at least according to the output of mount) but it does not have the desired effect. It acts just like before. Whether this is because it is not implemented for that filesystem or because it is not the option to do what we want I do not know. I would be interested in seeing how Mandrake 9.2 is automounting these drives. What are the active options? carlywarly?
I will be upgrading to SuSE 9 in the next few days I hope (the CDs have been sitting on my desk for a few weeks) and will get back to you guys about how it handles USB drives.
Semper Fi MI Aviator, your dilemma is one of the main reasons I got my flash drive. It is so much easier to plug it in and pass files back and forth between OS's that are not alike (and at work rather than having to deal with up and down military e-mail).
Only thing I changed is to remove kudzu so it would stop deleting the mount point and editing fstab automatically. There was a change in behavior between 2.4.22-10mdk kernel (stock) and the updated 2.4.22-21mdk kernel I'm using now, however. Used to create the mount point under user's home ~/tmp/mnt/removable and now it creates it in /mnt/removable and chown's that dir to user:group instead. In any case, Mandy 9.2 seems to flush the write cache every few seconds regardless of the device I'm using. So I sort of doubt the USB mass storage driver has anything to do with it. Have no idea how to tweak the default cache behavior, but that's my guess.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.