9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] OT: puzzle
@ 2004-10-04 18:16 Nigel Roles
  2004-10-04 18:45 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Nigel Roles @ 2004-10-04 18:16 UTC (permalink / raw)
  To: Fans of Plan9

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-04 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-04 18:16 [9fans] OT: puzzle Nigel Roles
2004-10-04 18:45 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).