Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43499
| References | (2 earlier) <5363f8ea-f2a6-4a08-a216-18c6666ba698@googlegroups.com> <asoiq9Flkh1U1@mid.individual.net> <51674ffc$0$29977$c3e8da3$5496439d@news.astraweb.com> <pan.2013.04.13.02.33.28.725000@nowhere.com> <5168ce64$0$29977$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2013-04-13 13:43 +1000 |
| Subject | Re: [OT] Lying hard drives [was Re: shutil.copyfile is incomplete (truncated)] |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.544.1365824646.3114.python-list@python.org> (permalink) |
On Sat, Apr 13, 2013 at 1:17 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > On Sat, 13 Apr 2013 03:33:29 +0100, Nobody wrote: >> If you want to wait for the data written to be written to the physical >> disk (in order to obtain specific behaviour with respect to an unclean >> shutdown), use f.flush() followed by os.fsync(f.fileno()). > > If only it were that simple. It has been documented that some disks will > lie, even when told to sync. When I say "some", I mean *most*. There's > probably nothing you can do about it, apart from not using that model or > brand of disk, so you have to just live with the risk. It's often close to that simple. With most hard disks, you can make them 100% reliable, but you may have to check some disk parameters (on Linux, that's just a matter of writing to something in /proc somewhere, don't remember the details but it's easy to check). The worst offenders I've met are SSDs... > USB sticks are especially nasty. I've got quite a few USB thumb drives > where the "write" light keeps flickering for anything up to five minutes > after the OS reports that the drive has been unmounted and is safe to > unplug. I corrupted the data on these quite a few times until I noticed > the light. And let's not even mention the drives that have no light at > all... ... but you've met worse. > But my favourite example of lying hard drives of all time is this: > > http://blog.jitbit.com/2011/04/chinese-magic-drive.html > > I want one of those! Awesome! It's the new version of DoubleSpace / DriveSpace! http://en.wikipedia.org/wiki/DriveSpace (And its problems, according to that Wikipedia article, actually had the same root cause - write caching that the user wasn't aware of. Great.) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 11:12 -0700
Re: shutil.copyfile is incomplete (truncated) Neil Cerutti <neilc@norwich.edu> - 2013-04-11 18:53 +0000
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 12:07 -0700
Re: shutil.copyfile is incomplete (truncated) Neil Cerutti <neilc@norwich.edu> - 2013-04-11 19:55 +0000
Re: shutil.copyfile is incomplete (truncated) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-12 00:06 +0000
Re: shutil.copyfile is incomplete (truncated) Cameron Simpson <cs@zip.com.au> - 2013-04-12 11:15 +1000
Re: shutil.copyfile is incomplete (truncated) Ned Deily <nad@acm.org> - 2013-04-11 18:33 -0700
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:32 -0700
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:53 -0700
Re: shutil.copyfile is incomplete (truncated) Ned Deily <nad@acm.org> - 2013-04-12 00:53 -0700
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:53 -0700
Re: shutil.copyfile is incomplete (truncated) Cameron Simpson <cs@zip.com.au> - 2013-04-12 18:26 +1000
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-12 02:18 -0700
Re: shutil.copyfile is incomplete (truncated) Chris Angelico <rosuav@gmail.com> - 2013-04-12 19:22 +1000
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-12 05:07 -0700
Re: shutil.copyfile is incomplete (truncated) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-12 13:18 +0100
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-12 05:07 -0700
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-12 02:18 -0700
Re: shutil.copyfile is incomplete (truncated) Roy Smith <roy@panix.com> - 2013-04-12 10:57 -0400
Re: shutil.copyfile is incomplete (truncated) Roy Smith <roy@panix.com> - 2013-04-12 10:54 -0400
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:32 -0700
Re: shutil.copyfile is incomplete (truncated) Roy Smith <roy@panix.com> - 2013-04-12 10:47 -0400
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:27 -0700
Re: shutil.copyfile is incomplete (truncated) Roy Smith <roy@panix.com> - 2013-04-12 10:51 -0400
Re: shutil.copyfile is incomplete (truncated) 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-12 08:49 -0700
Re: shutil.copyfile is incomplete (truncated) Nobody <nobody@nowhere.com> - 2013-04-13 03:33 +0100
Re: shutil.copyfile is incomplete (truncated) Chris Angelico <rosuav@gmail.com> - 2013-04-13 13:05 +1000
[OT] Lying hard drives [was Re: shutil.copyfile is incomplete (truncated)] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-13 03:17 +0000
Re: [OT] Lying hard drives [was Re: shutil.copyfile is incomplete (truncated)] Chris Angelico <rosuav@gmail.com> - 2013-04-13 13:43 +1000
Re: shutil.copyfile is incomplete (truncated) Rob Schneider <rmschne@gmail.com> - 2013-04-11 23:25 -0700
Re: shutil.copyfile is incomplete (truncated) Chris Angelico <rosuav@gmail.com> - 2013-04-12 17:32 +1000
Re: shutil.copyfile is incomplete (truncated) Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-12 10:48 -0400
csiph-web