9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Nigel Roles" <nigel@9fs.org>
To: "Fans of Plan9" <9fans@cse.psu.edu>
Subject: [9fans] OT: puzzle
Date: Mon,  4 Oct 2004 19:16:23 +0100	[thread overview]
Message-ID: <HOEHIDJJJINMLFPOLFJCAEMBDFAA.nigel@9fs.org> (raw)

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



             reply	other threads:[~2004-10-04 18:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 18:16 Nigel Roles [this message]
2004-10-04 18:45 ` Russ Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HOEHIDJJJINMLFPOLFJCAEMBDFAA.nigel@9fs.org \
    --to=nigel@9fs.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).