From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nigel Roles" To: "Fans of Plan9" <9fans@cse.psu.edu> Date: Mon, 4 Oct 2004 19:16:23 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: [9fans] OT: puzzle Topicbox-Message-UUID: eca6d87c-eacd-11e9-9e20-41e7f4b1d025 I've been struggling with this one for a bit, so I thought I'd consult the combined brains of the 9fans list. Imagine I want to reverse engineer the disk format used by a hardware raid 5 controller. I plug 3 disks into a controller, build the array, and then write a test pattern to the logical file system. I then remove the raid controller, plug the disks direct into the motherboard and examine the layout on each disk. Because of the way raid 5 works (in theory), I expect to see a mixture of plaintext blocks, blocks which are xors of the other pairs of blocks, and management blocks containing proprietary stuff I may well not decipher. What pattern should I write to each block so that I can tell 1) whether a block is an xor, plaintext, or management block 2) for plaintext ones, which logical block it holds 3) for xor ones, which two plaintext blocks it is the xor of 1) seems easy as if there is a fixed pattern in every block, it will appear as nulls in any xor block. So long as the pattern is reasonably long, it is unlikely to accidentally match a management block. 2) is simply a matter of writing a block number into the block as well as the fixed pattern 3) has me stumped. All suggestions welcome, including "you can't do it". Nigel