Raid
≈ 15 min read
Names in other languages
- 繁體中文雷達 (除蟲)
- ČeštinaRaid
- DeutschRaid
- EnglishRaid
- fiRaid
- FrançaisRaid
- NederlandsRaid
- PortuguêsRaid
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
RAID (Redundant Array of Independent Disks) is an orchestrated approach to computer data storage in which data is written to more than one secondary storage device. Instead of storing all data in a single hard disk drive or solid-state drive, RAID coordinates two or more such devices into a disk array. When the computer writes data to secondary storage, the RAID system distributes the data across the array. There are several possible ways of doing this, and those various configurations are called RAID levels. RAID levels are distinguished by the amount of redundancy they afford and the minimum number of drives they require, as well as by their relative complexity, performance, energy efficiency, fault tolerance, and availability. The definitive techniques used by RAID were conceived in the 1970s and 1980s: data striping to improve read/write efficiency, and disk mirroring or parity drives for data recovery. With the exception of RAID 1, all of the standard RAID levels use storage virtualization to abstract multiple storage devices into one logical storage volume. In its original coinage, RAID is an acronym for redundant array of inexpensive disks. The RAID Advisory Board (est. 1992) later redefined the acronym to mean redundant array of independent disks.…
RAID (Redundant Array of Independent Disks) is an orchestrated approach to computer data storage in which data is written to more than one secondary storage device. Instead of storing all data in a single hard disk drive or solid-state drive, RAID coordinates two or more such devices into a disk array. When the computer writes data to secondary storage, the RAID system distributes the data across the array. There are several possible ways of doing this, and those various configurations are called RAID levels. RAID levels are distinguished by the amount of redundancy they afford and the minimum number of drives they require, as well as by their relative complexity, performance, energy efficiency, fault tolerance, and availability. The definitive techniques used by RAID were conceived in the 1970s and 1980s: data striping to improve read/write efficiency, and disk mirroring or parity drives for data recovery. With the exception of RAID 1, all of the standard RAID levels use storage virtualization to abstract multiple storage devices into one logical storage volume. In its original coinage, RAID is an acronym for redundant array of inexpensive disks. The RAID Advisory Board (est. 1992) later redefined the acronym to mean redundant array of independent disks. Before the advent of data striping and redundant, online disks, it was common for high-capacity, high-availability data storage to rely on so-called SLEDs ("single, large, expensive disks") connected to mainframe computers. RAID has been deployed not only in mainframe computers, but in personal computers, supercomputers, file servers, database servers, web servers, and network-attached storage appliances. === Hardware-based === Hardware RAID controllers can be configured through card BIOS or Option ROM before an operating system is booted, and after the operating system is booted, proprietary configuration utilities are available from the manufacturer of each controller. Unlike the network interface controllers for Ethernet, which can usually be configured and serviced entirely through the common operating system paradigms like ifconfig in Unix, without a need for any third-party tools, each manufacturer of each RAID controller usually provides their own proprietary software tooling for each operating system that they deem to support, ensuring a vendor lock-in, and contributing to reliability issues. For example, in FreeBSD, in order to access the configuration of Adaptec RAID controllers, users are required to enable Linux compatibility layer, and use the Linux tooling from Adaptec, potentially compromising the stability, reliability and security of their setup, especially when taking the long-term view. Some other operating systems have implemented their own generic frameworks for interfacing with any RAID controller, and provide tools for monitoring RAID volume status, as well as facilitation of drive identification through LED blinking, alarm management and hot spare disk designations from within the operating system without having to reboot into card BIOS. For example, this was the approach taken by OpenBSD in 2005 with its bio(4) pseudo-device and the bioctl utility, which provide volume status, and allow LED/alarm/hotspare control, as well as the sensors (including the drive sensor) for health monitoring; this approach has subsequently been adopted and extended by NetBSD in 2007 as well. === Software-based=== Software RAID implementations are provided by many modern operating systems. Software RAID can be implemented as: A layer that abstracts multiple devices, thereby providing a single virtual device (such as Linux kernel's md and OpenBSD's softraid) A more generic logical volume manager (provided with most server-class operating systems such as Veritas or LVM) A component of the file system (such as ZFS, Spectrum Scale or Btrfs) A layer that sits above any file system and provides parity protection to user data (such as RAID-F) Some advanced file systems are designed to organize data across multiple storage devices directly, without needing the help of a third-party logical volume manager: ZFS supports the equivalents of RAID 0, RAID 1, RAID 5 (RAID-Z1) single-parity, RAID 6 (RAID-Z2) double-parity, and a triple-parity version (RAID-Z3) also referred to as RAID 7. As it always stripes over top-level vdevs, it supports equivalents of the 1+0, 5+0, and 6+0 nested RAID levels (as well as striped triple-parity sets) but not other nested combinations. ZFS is the native file system on Solaris and illumos, and is also available on FreeBSD and Linux. Open-source ZFS implementations are actively developed under the OpenZFS umbrella project. Spectrum Scale, initially developed by IBM for media streaming and scalable analytics, supports declustered RAID protection schemes up to n+3. A particularity is the dynamic rebuilding priority which runs with low impact in the background until a data chunk hits n+0 redundancy, in which case this chunk is quickly rebuilt to at least n+1. On top, Spectrum Scale supports metro-distance RAID 1. Btrfs supports RAID 0, RAID 1 and RAID 10 (RAID 5 and 6 are under development). XFS was originally designed to provide an integrated volume manager that supports concatenating, mirroring and striping of multiple physical storage devices. However, the implementation of XFS in Linux kernel lacks the integrated volume manager. Many operating systems provide RAID implementations, including the following: Hewlett-Packard's OpenVMS operating system supports RAID 1. The mirrored disks, called a "shadow set", can be in different locations to assist in disaster recovery. Apple's macOS and macOS Server natively support RAID 0, RAID 1, and RAID 1+0, which can be created with Disk Utility or its command-line interface. Some third party software offers support for RAID 4 and RAID 5. FreeBSD supports RAID 0, RAID 1, RAID 3, and RAID 5, and all nestings via GEOM modules and ccd. Linux's md supports RAID 0, RAID 1, RAID 4, RAID 5, RAID 6, and all nestings. Certain reshaping/resizing/expanding operations are also supported. Microsoft Windows supports RAID 0, RAID 1, and RAID 5 using various software implementations. Logical Disk Manager, introduced with Windows 2000, allows for the creation of RAID 0, RAID 1, and RAID 5 volumes by using dynamic disks, but this was limited only to professional and server editions of Windows until the release of Windows 8. Windows XP can be modified to unlock support for RAID 0, 1, and 5. Windows 8 and Windows Server 2012 introduced a RAID-like feature known as Storage Spaces, which also allows users to specify mirroring, parity, or no redundancy on a folder-by-folder basis. These options are similar to RAID 1 and RAID 5, but are implemented at a higher abstraction level. NetBSD supports RAID 0, 1, 4, and 5 via its software implementation, named RAIDframe. OpenBSD supports RAID 0, 1 and 5 via its software implementation, named softraid. If a boot drive fails, the system has to be sophisticated enough to be able to boot from the remaining drive or drives. For instance, consider a computer whose disk is configured as RAID 1 (mirrored drives); if the first drive in the array fails, then a first-stage boot loader might not be sophisticated enough to attempt loading the second-stage boot loader from the second drive as a fallback. The second-stage boot loader for FreeBSD is capable of loading a kernel from such an array. === Firmware- and driver-based === controller that provides RAID functionality through proprietary firmware and drivers Software-implemented RAID is not always compatible with the system's boot process, and it is generally impractical for desktop versions of Windows. However, hardware RAID controllers are expensive and proprietary. To fill this gap, inexpensive "RAID controllers" were introduced that do not contain a dedicated RAID controller chip, but simply a standard drive controller chip, or the chipset built-in RAID function, with proprietary firmware and drivers. During early bootup, the RAID is implemented by the firmware and, once the operating system has been more completely loaded, the drivers take over control. Consequently, such controllers may not work when driver support is not available for the host operating system. An example is Intel Rapid Storage Technology, implemented on many consumer-level motherboards. Because some minimal hardware support is involved, this implementation is also called "hardware-assisted software RAID", "hybrid model" RAID, or even "fake RAID". If RAID 5 is supported, the hardware may provide a hardware XOR accelerator. An advantage of this model over the pure software RAID is that—if using a redundancy mode—the boot drive is protected from failure (due to the firmware) during the boot process even before the operating system's drivers take over. == Integrity == Data scrubbing (referred to in some environments as patrol read) involves periodic reading and checking by the RAID controller of all the blocks in an array, including those not otherwise accessed. This detects bad blocks before use. Data scrubbing checks for bad blocks on each storage device in an array, but also uses the redundancy of the array to recover bad blocks on a single drive and to reassign the recovered data to spare blocks elsewhere on the drive. Frequently, a RAID controller is configured to "drop" a component drive (that is, to assume a component drive has failed) if the drive has been unresponsive for eight seconds or so; this might cause the array controller to drop a good drive because that drive has not been given enough time to complete its internal error recovery procedure. Consequently, using consumer-marketed drives with RAID can be risky, and so-called "enterprise class" drives limit this error recovery time to reduce risk. Western Digital's desktop drives used to have a specific fix. A utility called WDTLER.exe limited a drive's error recovery time. The utility enabled TLER (time limited error recovery), which limits the error recovery time to seven seconds. Around September 2009, Western Digital disabled this feature in their desktop drives (such as the Caviar Black line), making such drives unsuitable for use in RAID configurations. However, Western Digital enterprise class drives are shipped from the factory with TLER enabled. Similar technologies are used by Seagate, Samsung, and Hitachi. For non-RAID usage, an enterprise class drive with a short error recovery timeout that cannot be changed is therefore less suitable than a desktop drive. In late 2010, the Smartmontools program began supporting the configuration of ATA Error Recovery Control, allowing the tool to configure many desktop class hard drives for use in RAID setups. While RAID may protect against physical drive failure, the data is still exposed to operator, software, hardware, and virus destruction. Many studies cite operator fault as a common source of malfunction, such as a server operator replacing the incorrect drive in a faulty RAID, and disabling the system (even temporarily) in the process. An array can be overwhelmed by catastrophic failure that exceeds its recovery capacity and the entire array is at risk of physical damage by fire, natural disaster, and human forces, however backups can be stored off site. An array is also vulnerable to controller failure because it is not always possible to migrate it to a new, different controller without data loss. === Unrecoverable read errors during rebuild === Unrecoverable read errors (URE) present as sector read failures, also known as latent sector errors (LSE). The associated media assessment measure, unrecoverable bit error (UBE) rate, is typically guaranteed to be less than one bit in 10 15 for enterprise-class drives (SCSI, FC, SAS or SATA), and less than one bit in 10 14 for desktop-class drives (IDE/ATA/PATA or SATA). Increasing drive capacities and large RAID 5 instances have led to the maximum error rates being insufficient to guarantee a successful recovery, due to the high likelihood of such an error occurring on one or more remaining drives during a RAID set rebuild. When rebuilding, parity-based schemes such as RAID 5 are particularly prone to the effects of UREs as they affect not only the sector where they occur, but also reconstructed blocks using that sector for parity computation. Double-protection parity-based schemes, such as RAID 6, attempt to address this issue by providing redundancy that allows double-drive failures; as a downside, such schemes suffer from elevated write penalty—the number of times the storage medium must be accessed during a single write operation. Schemes that duplicate (mirror) data in a drive-to-drive manner, such as RAID 1 and RAID 10, have a lower risk from UREs than those using parity computation or mirroring between striped sets. Data scrubbing, as a background process, can be used to detect and recover from UREs, effectively reducing the risk of them happening during RAID rebuilds and causing double-drive failures. The recovery of UREs involves remapping of affected underlying disk sectors, utilizing the drive's sector remapping pool; in case of UREs detected during background scrubbing, data redundancy provided by a fully operational RAID set allows the missing data to be reconstructed and rewritten to a remapped sector. The behavior of the RAID implementation on encountering on a rebuild also matters. Some implementations puncture the array when a URE is encountered, marking the sector/block as inaccessible but continuing with the rebuild. Others may simply abort the procedure. === Atomicity === A system crash or other interruption of a write operation can result in states where the parity is inconsistent with the data due to non-atomicity of the write process, such that the parity cannot be used for recovery in the case of a disk failure. This is commonly termed the write hole which is a known data corruption issue in older and low-end RAIDs, caused by interrupted destaging of writes to disk. The write hole can be addressed in a few ways: Write-ahead logging. Hardware RAID systems use an onboard nonvolatile cache for this purpose. mdadm can use a dedicated journaling device (to avoid performance penalty, typically, SSDs and NVMs are preferred) for this purpose. The device acts as a write cache in write-through or write-back mode. Write intent logging. mdadm uses a "write-intent-bitmap". If it finds any location marked as incompletely written at startup, it resyncs them. It closes the write hole but does not protect against loss of in-transit data, unlike a full WAL. Partial parity. mdadm can save a "partial parity" that, when combined with modified chunks, recovers the original parity. This closes the write hole, but again does not protect against loss of in-transit data. Dynamic stripe size. RAID-Z ensures that each block is its own stripe, so every block is complete. Copy-on-write (COW) transactional semantics guard metadata associated with stripes. The downside is IO fragmentation. Avoiding overwriting used stripes. bcachefs, which uses a copying garbage collector, chooses this option. COW again protect references to striped data. Write hole is a poorly understood and rarely mentioned failure mode for redundant storage systems that do not utilize transactional features. Database researcher Jim Gray wrote "Update in Place is a Poison Apple" during the early days of relational database commercialization.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1374924290 under CC BY-SA 4.0; modifications have been made.