The implementation of RAID is another area of variation.
Consider the following layers at which RAID can be implemented.
• Volume-management software can implement RAID within the kernel or at the system software layer.
In this case, the storage hardware can provide minimal features and still be part of a full RAID solution.
Parity RAID is fairly slow when implemented in software, so typically RAID 0, 1, or 0 + 1 is used.
• RAID can be implemented in the host bus-adapter (HBA) hardware.
Only the disks directly connected to the HBA can be part of a given RAID set.
This solution is low in cost but not very flexible.
• RAID can be implemented in the hardware of the storage array.
The storage array can create RAID sets of various levels and can even slice these sets into smaller volumes, which are then presented to the operating system.
The operating system need only implement the file system on each of the volumes.
Arrays can have multiple connections available or can be part of a SAN, allowing multiple hosts to take advantage of the array’s features.
•RAID can be implemented in the SAN interconnect layer by disk virtualization devices.
In this case, a device sits between the hosts and the storage.
It accepts commands from the servers and manages access to the storage.
It could provide mirroring, for example, by writing each block to two separate storage devices.
Other features, such as snapshots and replication, can be implemented at each of these levels as well.
A snapshot is a view of the file system before the last update took place. (Snapshots are covered more fully in Chapter 12.)
Replication involves the automatic duplication of writes between separate sites for redundancy and disaster recovery.
Replication can be synchronous or asynchronous.
In synchronous replication, each block must be written locally and remotely before the write is considered complete, whereas in asynchronous replication, the writes are grouped together and written periodically.
Asynchronous replication can result in data loss if the primary site fails, but it is faster and has no distance limitations.
The implementation of these features differs depending on the layer at which RAID is implemented.
For example, if RAID is implemented in software, then each host may need to carry out and manage its own replication.
If replication is implemented in the storage array or in the SAN interconnect, however, then whatever the host operating system or its features, the host’s data can be replicated.
One other aspect of most RAID implementations is a hot spare disk or disks.
A hot spare is not used for data but is configured to be used as a replacement in case of disk failure.
For instance, a hot spare can be used to rebuild a mirrored pair should one of the disks in the pair fail. In this way, the RAID level can be reestablished automatically, without waiting for the failed disk to be replaced.
Allocating more than one hot spare allows more than one failure to be repaired without human intervention.