On Thu, Oct 07, 2010 at 11:29:02PM +0200, Milan Broz wrote: > On 10/07/2010 10:20 PM, octane indice wrote: > > It's just a theorical question. I encrypted some data with dm-crypt on an > > hard drive. > > But what happens if the hard drive has an error? Not a kind of a big error > > which cause the hard drive hangs, but just a small error that make the > > system doesn't read the bytes all right? > > > > Obviously, dm-crypt won't decrypt the data. But what happens next? > > Basically the same like if you have IO error on plain disk - the > IO operation returns IO error. Upper layer decides what to do next. Just to clarify this a bit further: disk error correction capability is limited, an unrecoverable read error is a real possibility. The datasheets say once every 10^15 bits read, which whould translate to an unreadable sector once every 125 TB read. I think this is realistic, but still a bit of a worst case scenario. Also keep in mind that this is for a healthy disk only. The error detection capabilities of the coding uses is far, far larger. An undetected unrecovrable error (i.e. you get wrong data but no error even on retry) is something unlikely enough that you can safely ignore the possibility. There are special safeguards against this, as error correction by itself can correct to the wrong value. Nonetheless, you can find wrong data on disks without any explanation or detected errors. The reason is typically corruption in RAM or in busses before the data is written. For a complex data aquisition system (compression -> network -> disk-buffer -> tape-library), I have observed something like one unexplained bit error every 5-10TB written. This number may vary wildly in practice. Especially overclocking and cheap non-ECC RAM may drive it up. Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@xxxxxxxxxxx GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier _______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx http://www.saout.de/mailman/listinfo/dm-crypt