This is a discussion on disable data caching for USB storage? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, I understand that, whenever I write data to a any file system (be it on floppy, HDD or ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I understand that, whenever I write data to a any file system (be it on floppy, HDD or USB storage), not all the data is written immediately and in real-time, but some of it is scheduled for writing it later. That's fine with HDDs, because you have them connected all the time. But it's quite an annoyance with USB sticks, CF cards and the like, because it slows down the unmounting process significantly. All of my USB storage is formatted FAT16, so it's not the least bit journalling (if that's got anything to do with it). Does any of you know a way to disable data caching for /dev/sd*, maybe some entry in /etc/fstab? TIA, ~Mik -- "The geek shall inherit the earth." -- Rainer Wolfcastle in "Undercover Nerd" |
| |||
| Maybe add sync to /etc/fstab /dev/camera /mnt/camera vfat noauto,user,sync 0 0 Mike Mario Berger wrote: > Hi, > > I understand that, whenever I write data to a any file system (be it on > floppy, HDD or USB storage), not all the data is written immediately and > in real-time, but some of it is scheduled for writing it later. That's > fine with HDDs, because you have them connected all the time. > > But it's quite an annoyance with USB sticks, CF cards and the like, > because it slows down the unmounting process significantly. All of my > USB storage is formatted FAT16, so it's not the least bit journalling > (if that's got anything to do with it). > > Does any of you know a way to disable data caching for /dev/sd*, maybe > some entry in /etc/fstab? > > TIA, > ~Mik > |
| |||
| Michal wrote: > Mario Berger wrote: >> Does any of you know a way to disable data caching for /dev/sd*, maybe >> some entry in /etc/fstab? >> > Maybe add sync to /etc/fstab > /dev/camera /mnt/camera vfat noauto,user,sync 0 0 according to 'man mount', sync only has effect for ext2, ext3 and udf. -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| Mario Berger wrote: > Hi, > > I understand that, whenever I write data to a any file system (be it on > floppy, HDD or USB storage), not all the data is written immediately and > in real-time, but some of it is scheduled for writing it later. That's > fine with HDDs, because you have them connected all the time. > > But it's quite an annoyance with USB sticks, CF cards and the like, > because it slows down the unmounting process significantly. All of my > USB storage is formatted FAT16, so it's not the least bit journalling > (if that's got anything to do with it). > > Does any of you know a way to disable data caching for /dev/sd*, maybe > some entry in /etc/fstab? > > TIA, > ~Mik > I don't think this is possible. You can umount your USB sticks before removing it; then there will be no problems. -- Olive |
| |||
| >>> Does any of you know a way to disable data caching for /dev/sd*, maybe >>> some entry in /etc/fstab? >>> >> Maybe add sync to /etc/fstab >> /dev/camera /mnt/camera vfat noauto,user,sync 0 0 > > according to 'man mount', sync only has effect for ext2, ext3 and > udf. From what I've seen it works for vfat too... (the perfomrance hit is very visible). -- damjan |
| |||
| Joost Kremers wrote: > according to 'man mount', sync only has effect for ext2, ext3 and > udf. I read that too, but it actually does work for me (FAT16). Thanks to Michal ~Mik -- "The geek shall inherit the earth." -- Rainer Wolfcastle in "Undercover Nerd" |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 NotDashEscaped: You need GnuPG to verify this message On Tue, 25 Jan 2005 00:12:06 +0100, Olive <olive.lin@versateladsl.be> wrote: > I don't think this is possible. You can umount your USB sticks before > removing it; then there will be no problems. I think the issue is not the fact the USB stick loses data if it isn't unmounted, it's the fact that the unmounting process takes longer than it really needs to. -- Rob | If not safe, http://rob.axpr.net | one can never be free. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFB+Tquhm6KEoOOAe0RAgkOAJ9TujPZYxTU/zTuA9BRI7guz73+FwCfUk/T eVpOM+vzYEDzIVa8RgvrVvA= =K82Y -----END PGP SIGNATURE----- |
| ||||
| On Thu, 27 Jan 2005 19:02:43 -0000, AthlonRob <junkmail@axpr.net> wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 >NotDashEscaped: You need GnuPG to verify this message > >On Tue, 25 Jan 2005 00:12:06 +0100, Olive <olive.lin@versateladsl.be> wrote: >> I don't think this is possible. You can umount your USB sticks before >> removing it; then there will be no problems. > >I think the issue is not the fact the USB stick loses data if it isn't >unmounted, it's the fact that the unmounting process takes longer than >it really needs to. This discussion reminds me about when I was running iomega zip-disks under linux. Had the similar issue: why does umount take so long, those things locked the media until umount, eject. Adding 'sync' to the fstab entry destroys performance (try it with a floppy, you'll hear the directory rewrite seeking), so I got into the habit of following file write commands with a 'sync' command. Thay way, the data is immediately written out to the removable media, taking full advantage of write caching --> fastest write performance. The delay in umount seems more a perception of being longer, as the cached write data is flushed to the media, and the user is waiting, waiting to rip out the media and get on with whatever... Cheers, Grant. |