Re: [gentoo-user] udev and usb stick/hdd
On Tue, 24 Jul 2007 21:03:55 +0800, Crayon Shin Chan wrote: > > I broke a GB stick in a couple of months by writing 700MB > > files to it. > > For reference, when it broke, what happened? Does it die outright, or > do you get intermittent failures? Read/write errors every time I tried to use it, which confirmed that the FAT area was borked. -- Neil Bothwick TERROR: A female Klingon with PMS. signature.asc Description: PGP signature
Re: [gentoo-user] udev and usb stick/hdd
On Tuesday 24 July 2007 04:21, Neil Bothwick wrote: > I broke a GB stick in a couple of months by writing 700MB > files to it. For reference, when it broke, what happened? Does it die outright, or do you get intermittent failures? -- Crayon -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] udev and usb stick/hdd
Hello Alan McKinnon, > It's only a matter of time and relates to how flash devices work. After > many many writes to the same storage cell, it degrades. The good ones > are rated to about 100,000 writes per cell. The cheap and nasty ones > can be as low as 10,000 writes. You would be amazed how quickly 50,000 > writes can happen to the same cell when used as swap for example It's worse than that. The vfat driver updates the FAT after every 4K block (or at least it did a few kernel versions ago), so copying a large file can result in tens of thousands of writes to the same location. I broke a GB stick in a couple of months by writing 700MB files to it. -- Neil Bothwick I don't have any solution, but I certainly admire the problem. signature.asc Description: PGP signature
Re: [gentoo-user] udev and usb stick/hdd
On Monday 23 July 2007, maxim wexler wrote: > > Which will destroy your flash device in as little as > > a couple of months > > (voice of experience here), and it probably the > > reason the option was > > removed. > > Ulp! Here's my line from fstab: > > /dev/sdb1 /usbauto > noauto,user,rw,exec,sync0 0 > > Copied from a forum somewhere. For use of my mp3 > player and digi-camera, both formatted vfat. Does > 'noauto' cancel 'sync'? This way un/mounting must be > done manually. Does that spare me? No. read 'man mount' In a nutshell, noauto means the device will not be automativcally mounted at boot time when the init script runs. sync is a different beast - it means that "All I/O to the file system should be done synchronously." That means that when the kernel say to write to the device, it does get written, and not cached somewhere. Caching it and returning the correct result to indicate that the write was completed would be of course 'async' > I haven't noticed any problems yet. Are you saying > that the damage is incremental, that it accumulates > until a certain point is reached and the device is > kaput? It's only a matter of time and relates to how flash devices work. After many many writes to the same storage cell, it degrades. The good ones are rated to about 100,000 writes per cell. The cheap and nasty ones can be as low as 10,000 writes. You would be amazed how quickly 50,000 writes can happen to the same cell when used as swap for example This is a known issue with flash devices. The correct solution is to ONLY write to the device once you are ready to unmount it. Treat it much like a CD and you'll be OK alan -- Optimists say the glass is half full, Pessimists say the glass is half empty, Developers say wtf is the glass twice as big as it needs to be? Alan McKinnon alan at linuxholdings dot co dot za +27 82, double three seven, one nine three five -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] udev and usb stick/hdd
> > Which will destroy your flash device in as little as > a couple of months > (voice of experience here), and it probably the > reason the option was > removed. > > Ulp! Here's my line from fstab: /dev/sdb1 /usbauto noauto,user,rw,exec,sync0 0 Copied from a forum somewhere. For use of my mp3 player and digi-camera, both formatted vfat. Does 'noauto' cancel 'sync'? This way un/mounting must be done manually. Does that spare me? I haven't noticed any problems yet. Are you saying that the damage is incremental, that it accumulates until a certain point is reached and the device is kaput? Maxim Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] udev and usb stick/hdd
On Sat, 21 Jul 2007 18:16:53 +0300, Aleksey V. Kunitskiy wrote: > > It seems vfat doesn't have a "sync" mount option. For ntfs-3g I don't > > know. > That's a pitty. It's a big problem for me when I write data to flash > disk and I need to flush data frequently. Which will destroy your flash device in as little as a couple of months (voice of experience here), and it probably the reason the option was removed. -- Neil Bothwick "Bother," said Pooh, as the Death Star exploded around him. signature.asc Description: PGP signature
Re: [gentoo-user] udev and usb stick/hdd
On Sunday 22 July 2007 15:20, Dirk Heinrichs wrote: > Hmm, why is this a problem? As long as you always umount before pulling > the USB stick your data will be save. You may also try to sync > manually. In fact it is an advantage, because apparently the "sync" option causes unnecessary extra writes to the flash which reduces its lifespan. -- Crayon -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] udev and usb stick/hdd
Am Samstag, 21. Juli 2007 schrieb Aleksey V. Kunitskiy: > On Saturday 21 July 2007 17:15, Dirk Heinrichs wrote: > > Yes. See http://www.reactivated.net/writing_udev_rules.html > > Big thanks Dirk > > > It seems vfat doesn't have a "sync" mount option. For ntfs-3g I don't > > know. > > That's a pitty. It's a big problem for me when I write data to flash disk > and I need to flush data frequently. Hmm, why is this a problem? As long as you always umount before pulling the USB stick your data will be save. You may also try to sync manually. Bye... Dirk signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] udev and usb stick/hdd
On Saturday 21 July 2007 17:15, Dirk Heinrichs wrote: > Yes. See http://www.reactivated.net/writing_udev_rules.html Big thanks Dirk > It seems vfat doesn't have a "sync" mount option. For ntfs-3g I don't know. That's a pitty. It's a big problem for me when I write data to flash disk and I need to flush data frequently. -- best regards, Aleksey V. Kunitskiy my public GPG/PGP key: http://www.alexey-kv.org.ua/pubkey.asc pgpNylcFLuNxQ.pgp Description: PGP signature
Re: [gentoo-user] udev and usb stick/hdd
Am Samstag, 21. Juli 2007 schrieb Aleksey V. Kunitskiy: > Can I precisely recognize usb stick and usb hard drive ? Note that the last > is exactly external usb hard drive, not a usb stick. Yes. See http://www.reactivated.net/writing_udev_rules.html > Can I disable write-cache on vfat,ntsf-3g? It seems vfat doesn't have a "sync" mount option. For ntfs-3g I don't know. HTH... Dirk signature.asc Description: This is a digitally signed message part.
[gentoo-user] udev and usb stick/hdd
Hi I'm trying to learn how to write udev rules for auto-naming usb sticks and usb hard drives. I have several problems that I can't solve: Can I precisely recognize usb stick and usb hard drive ? Note that the last is exactly external usb hard drive, not a usb stick. Can I disable write-cache on vfat,ntsf-3g? Thanks for any suggestions. -- best regards, Aleksey V. Kunitskiy my public GPG/PGP key: http://www.alexey-kv.org.ua/pubkey.asc pgpQtAErzNwsO.pgp Description: PGP signature