More information about the RAID5 controller copy problem

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

More information about the RAID5 controller copy problem

Post by *ghisler(Author) »

When copying files in the "big file copy mode", there are reproduceable byte errors when using the controller Adaptec 2400A with a 4 Disk RAID5 Array. We cannot say if other controllers are affected, we didn't have any other reports so far.

The incompatibility will be detected very quickly, because all files copied in that mode will have some damaged bytes. This mode is not active by default, it needs to be activated by hand. "Normal" IDE- and SCSI-Controllers don't cause any problems. With a small change in the creation of the buffer, the copying now works correctly.

The incompatibility has been corrected in Total Commander 6.03. An update is strongly recommended if you want to use the big file copy mode.

For those who are interested in the technical reasons:

To our knowledge, the error isn't in Total Commander, but in the driver of the Adaptec controller. according to the documentation of the Windows copy functions, the copy buffer _should_ be aligned to a sector boundary, but this wouldn't be enforced in every case.

See: the documentation for CreateFile under FILE_FLAG_NO_BUFFERING:

"Buffer addresses for read and write operations _should_ be sector aligned (aligned on addresses in memory that are integer multiples of the volume's sector size). Depending on the disk, this requirement may not be enforced."

This formulation doesn't let expect write errors when copying - Total Commander passes all data correctly to the copy function. It also works fine with all other controllers.

We assumed that the large buffers created with Delphi would always be aligned to memory pages, because it worked with all controllers. Unfortunately buffers created with Delphi always seem to be displaced by 4 bytes, because Delphi seems to store the buffer size in the first 4 bytes.
Author of Total Commander
https://www.ghisler.com
Roy
Junior Member
Junior Member
Posts: 26
Joined: 2004-04-21, 11:23 UTC

Post by *Roy »

Buffering or no buffering you should ALWAYS check error code of WriteFile() function.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I do - but this controller didn't even return an error, it just wrote some bad bytes - that's the bad thing about it...
Author of Total Commander
https://www.ghisler.com
Genghis86
Junior Member
Junior Member
Posts: 87
Joined: 2003-12-07, 02:02 UTC
Location: United States

Post by *Genghis86 »

Doyou have to use Delphi alloc?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I prefer not to mix all kinds of allocs, because it would be a source of additional errors.
Author of Total Commander
https://www.ghisler.com
Post Reply