Hard Disk IDs in Linux

On Thu, Mar 14, 2013 at 1:22 AM, Dan Egli <ddavidegli at gmail.com> wrote:
> *Perhaps I am misunderstanding how the RAID functionality works. I know it
> has to take a while to rewrite the contents of a 4TB drive. Even maxing the
> write speed of most hard disk drives that's going to take a few hours I
> bet. However, for the overall write speeds of the array during normal
> operations I'd imagine it would be somewhat fast because it's splitting the
> write operations between 30 disks (for raid6) at once. RAID10 works as well
> I know. But considering the amount of mirroring going on that would
> duplicate the writing, that would seem to slow it down. *
I haven't studied raid6 in depth yet. But, to answer your question
think of it this way: when you mirror, any block that is changed gets
written out twice, true. But that's it--it just sends it to each half
of the mirror and it's done. With parity, such as with raid5 and
raid6, if you change one block, it has to first *read* the other block
in the stripe, then calculate the 3rd parity block, and then write the
two changed blocks out. With raid6 it is potentially worse, having to
read yet a second block from a second stripe, calculate a second
parity block, then write 3 changed blocks out--that's my naive
understanding of raid6.
Obviously with raid5/6 access pattern can make a difference--you may
have already read in all of the blocks from the stripe, in which case
your penalty is to calculate the parity and write out just the changed
data and parity blocks. But still, now you have introduced a CPU-bound
task for each write I/O operation which is why in some cases dedicated
hw raid which offloads the parity calculation can help. (however IME
hw raid has been slower than the linux md driver).