Managing RAID on Linux - Derek Vadala [13]
Table 2-2. RAID level comparison
RAID-1
Linear mode
RAID-0
RAID-4
RAID-5
Write performance
Slow writes, worse than a standalone disk; as disks are added, write performance declines
Same as a standalone disk
Best write performance; much better than a single disk
Comparable to RAID-0, with one less disk
Comparable to RAID-0, with one less disk for large write operations; potentially slower than a single disk for write operations that are smaller than the stripe size
Read performance
Fast read performance; as disks are added, read performance improves
Same as a standalone disk
Best read performance
Comparable to RAID-0, with one less disk
Comparable to RAID-0, with one less disk
Number of disk failures
N-1
0
0
1
1
Applications
Image servers; application servers; systems with little dynamic content/updates
Recycling old disks; no application-specific advantages
Same as RAID-5, which is a better alternative
File servers; databases
RAID-0 (Striping)
RAID-0 is sometimes referred to simply as striping; it was not included in the original Berkeley specification and is not, strictly speaking, a form of RAID because there is no redundancy. Under RAID-0, the host system or a separate controller breaks data into blocks and writes it to different disks in round-robin fashion (as shown in Figure 2-5).
Figure 2-5. RAID-0 (striping) writes data consecutively across multiple drives.
This level yields the greatest performance and utilizes the maximum amount of available disk storage, as long as member disks are of identical sizes. Typically, if member disks are not of identical sizes, then each member of a striped array will be able to utilize only an amount of space equal to the size of the smallest member disk. Likewise, using member disks of differing speeds might introduce a bottleneck during periods of demanding I/O. See the I/O Channels and Matched drives sections, later in this chapter, for more information on the importance of using identical disks and controllers in an array.
* * *
Tip
In some implementations, stripes are organized so that all available storage space is usable. To facilitate this, data is striped across all disks until the smallest disk is full. The process repeats until no space is left on the array. The Linux kernel implements stripes in this way, but if you are working with a hardware RAID controller, this behavior might vary. Check the available technical documentation or contact your vendor for clarification.
* * *
Because there is no redundancy in RAID-0, a single disk failure can wipe out all files. Striped arrays are best suited to applications that require intensive disk access, but where the potential for disk failure and data loss is also acceptable. RAID-O might therefore be appropriate for a situation where backups are easily accessible or where data is available elsewhere in the event of a system failure—on a load-balanced network, for example.
Disk striping is also well suited for video production applications because the high data transfer rates allow tremendous source files to be postprocessed easily. But users would be wise to keep copies of finished clips on another volume that is protected either by traditional backups or a more redundant RAID architecture. Usenet news sites have historically chosen RAID-0 because, while data is not critical, I/O throughput is essential for maintaining a large-volume news feed. Local groups and backbone sites can keep newsgroups for which they are responsible on separate fault-tolerant drives to additionally protect against data loss.
Linear Mode
Linux supports another non-RAID capability called linear (or sometimes append) mode. Linear mode sequentially concatenates disks, creating one large disk without data redundancy or increased performance (as shown in Figure 2-6).
Figure 2-6. Linear (append)