Mailinglist Archive: opensuse (4498 mails)

< Previous Next >
Re: [SLE] is Raid 1 (mirror) so slow ?
  • From: "Greg Freemyer" <greg.freemyer@xxxxxxxxx>
  • Date: Thu, 9 Nov 2006 23:46:24 +0000 (UTC)
  • Message-id: <87f94c370611091546v499e0de7v7c1380647eea6725@xxxxxxxxxxxxxx>
On 11/9/06, Carlos E. R. <robin.listas@xxxxxxxxxxxxxx> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


The Thursday 2006-11-09 at 15:54 -0500, Greg Freemyer wrote:

...

> I don't know the details of how linux implements it but conceptually
> for the worse case with raid 5 (ie. scattered writes) to update a
> single block you have to:
>
> Read original block (even if your updating it 100%)
> Read Parity Block
> Back-out the original block from the parity calculation (Simple XOR logic)
> Put the new blocks data into the parity calculation (Simple XOR logic)
> Write the new data block
> Write the new parity block
>
> So it takes 4 i/o's to do a single logical write assuming scattered disk
> writes.

Question.

The data block, is it written to one disk, or is it split over two disks?

Again I don't know how Linux does it, but I just did some detail
reconstruction work on a 3-disk hardware raid5 using a dell perc
controller.

IIRC, the blocks were laid out like:

1 2 p
3 p 4
p 5 6
7 8 p

Each block was 64K (ie. 128 sectors), and full stripe was 2x64K or 128K.

So block 1 is on the first disk in the array. block 2 is on the
second disk in the array, and the first parity block is on the third
disk in the array. Block 3 is back on the first disk, and so on and
so on.

Now if only a 4K page is being updated, I don't know if just a single
4K page is read from the data block and parity blocks and then updates
done. Or if the logic only works with full 64K blocks at a time.

FYI, I was working at this low level because the hardware had failed
but I was able to extract fairly good dd images of the drives and I
used a low-cost windows program to rebuild the discrete dd images into
a single logical dd image. The tool was "Raid Reconstructor" and I
think is was less than $100.

Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century

< Previous Next >