There are seven RAID levels, 0-6, each referring to a method of distributing data while ensuring data redundancy. (RAID level 0 does not provide data redundancy, but is usually included as a RAID classification because it is the basis for the majority of RAID configurations in use.)
RAID level 0 (concatenations and stripes)
RAID level 1 (mirror)
RAID level 5 (striped metadevice with parity information)
RAID level 5 is striping with parity and data distributed across all disks. If a disk fails, the data on the failed disk can be rebuilt from the distributed data and parity information on the other disks.
Within DiskSuite, a RAID5 metadevice is a metadevice that supports RAID Level 5.
DiskSuite automatically initializes a RAID5 metadevice when you add a new slice, or resyncs a RAID5 metadevice when you replace an existing slice. DiskSuite also resyncs RAID5 metadevices during rebooting if a system failure or panic took place.
RAID5 metadevices have names like other metadevices (d0, d1, and so forth). For more information on metadevice naming, see Table 1-4.
RAID5 metadevices need fewer disks for data redundancy than mirrors, and therefore can cost less than a mirrored configuration.
Is there a maximum number of slices a RAID5 metadevice can have?
No. The more slices a RAID5 metadevice contains, however, the longer read operations take when a slice fails. (By the nature of RAID5 metadevices, write operations are always slower.)
By concatenating slices to the existing part of a RAID5 metadevice.
When I expand a RAID5 metadevice, are the new slices included in parity calculations?
What are the limitations to RAID5 metadevices?
You cannot use a RAID5 metadevice for root (/), /usr, and swap, or existing file systems.
Is there a way to recreate a RAID5 metadevice without having to "zero out" the data blocks?
Yes. You can use the metainit(1M) command with the -k option. (There is no equivalent within DiskSuite Tool.) The -k option recreates the RAID5 metadevice without initializing it, and sets the disk blocks to the OK state. If any errors exist on disk blocks within the metadevice, DiskSuite may begin fabricating data. Instead of using this option, you may want to initialize the device and restore data from tape. See the metainit(1M) man page for more information.
Figure 2-6 shows a RAID5 metadevice, d40.
The first three data chunks are written to Disks A through C. The next chunk that is written is a parity chunk, written to Drive D, which consists of an exclusive OR of the first three chunks of data. This pattern of writing data and parity chunks results in both data and parity spread across all disks in the RAID5 metadevice. Each drive can be read independently. The parity protects against a single disk failure. If each disk in this example were 2 Gbytes, the total capacity of d40 would be 6 Gbytes. (One drive's worth of space is allocated to parity.)
Figure 2-7 shows an example of an RAID5 metadevice that initially consisted of four disks (slices). A fifth disk has been dynamically concatenated to the metadevice to expand it.
The parity areas are allocated when the initial RAID5 metadevice is created. One column's (slice's) worth of space is allocated to parity, although the actual parity blocks are distributed across all of the original columns to avoid hot spots. When you concatenate additional slices to the RAID, the additional space is devoted entirely to data; no new parity blocks are allocated. The data on the concatenated slices is, however, included in the parity calculations, so it is protected against single device failures.
Concatenated RAID5 metadevices are not suited for long-term use. Use a concatenated RAID5 metadevice unitl it is possible to reconfigure a larger RAID5 metadevice and copy the data to the larger metadevice.
When you add a new slice to a RAID5 metadevice, DiskSuite "zeros" all the blocks in that slice. This ensures that the parity will protect the new data. As data is written to the additional space, DiskSuite includes it in the parity calculations.