Hardware Reference
In-Depth Information
RAID level 0 is illustrated in Fig. 2-23(a). It consists of viewing the virtual
disk simulated by the RAID as being divided up into strips of k sectors each, with
sectors 0 to k
1 being strip 0, sectors k to 2 k
1 as strip 1, and so on. For k
=
1,
each strip is a sector; for k
2 a strip is two sectors, etc. The RAID level 0 organi-
zation writes consecutive strips over the drives in round-robin fashion, as depicted
in Fig. 2-23(a) for a RAID with four disk drives. Distributing data over multiple
drives like this is called striping . For example, if the software issues a command
to read a data block consisting of four consecutive strips starting at a strip bound-
ary, the RAID controller will break this command up into four separate commands,
one for each of the four disks, and have them operate in parallel. Thus we have
parallel I/O without the software knowing about it.
RAID level 0 works best with large requests, the bigger the better. If a request
is larger than the number of drives times the strip size, some drives will get multi-
ple requests, so that when they finish the first request they start the second one. It
is up to the controller to split the request up and feed the proper commands to the
proper disks in the right sequence and then assemble the results in memory cor-
rectly. Performance is excellent and the implementation is straightforward.
RAID level 0 works worst with operating systems that habitually ask for data
one sector at a time. The results will be correct, but there is no parallelism and
hence no performance gain. Another disadvantage of this organization is that the
reliability is potentially worse than having a SLED. If a RAID consists of four
disks, each with a mean time to failure of 20,000 hours, about once every 5000
hours a drive will fail and all the data will be completely lost. A SLED with a
mean time to failure of 20,000 hours would be four times more reliable. Because
no redundancy is present in this design, it is not really a true RAID.
The next option, RAID level 1, shown in Fig. 2-23(b), is a true RAID. It dupli-
cates all the disks, so there are four primary disks and four backup disks in this ex-
ample, although any other even number of disks is also possible. On a write, every
strip is written twice. On a read, either copy can be used, distributing the load over
more drives. Consequently, write performance is no better than for a single drive,
but read performance can be up to twice as good. Fault tolerance is excellent: if a
drive crashes, the copy is simply used instead. Recovery consists of simply in-
stalling a new drive and copying the entire backup drive to it.
Unlike levels 0 and 1, which work with strips of sectors, RAID level 2 works
on a word basis, possibly even a byte basis. Imagine splitting each byte of the sin-
gle virtual disk into a pair of 4-bit nibbles, then adding a Hamming code to each
one to form a 7-bit word, of which bits 1, 2, and 4 were parity bits. Further imag-
ine that the seven drives of Fig. 2-23(c) were synchronized in terms of arm position
and rotational position. Then it would be possible to write the 7-bit Hamming
coded word over the seven drives, one bit per drive.
The Thinking Machines CM-2 computer used this scheme, taking 32-bit data
words and adding 6 parity bits to form a 38-bit Hamming word, plus an extra bit
for word parity, and spread each word over 39 disk drives. The total throughput
=
 
Search WWH ::




Custom Search