Social Icons

RAID

RAID:
Redundant Array of Inexpensive Disks (RAID) is a storage technology that provides data protection at the disk drive level.
There are 6 RAID configuration levels.

RAID 0 - Data striping
RAID 1 - Disk mirroring
RAID 2 - Parallel array, hamming code
RAID 3 - Parallel array with parity
RAID 4 - Data parity protection, dedicated parity drive
RAID 5 - Data parity protection, interleaved parity

With the Teradata Database, the two RAID technologies that are supported are RAID 1 and RAID 5, but the recommendation is always to implement RAID 1 as it provides the highest level of data protection.

RAID 1:

RAID 1 is a data protection scheme that uses mirrored pairs of disks to protect data from a single drive failure. RAID 1 requires double the number of disks because every drive has an identical mirrored copy. Recovery with RAID 1 is faster than with RAID 5. The highest level of data protection is RAID 1 with Fallback.

How RAID 1 Works:

RAID 1 protects against a single disk failure using the following principles:

  • Mirroring 
  • Reading
Mirroring:  RAID 1 maintains a mirrored disk for each disk in the system.
Reading:  Using both copies of the data, the system reads data blocks from the first available disk. This does not so much protect data as provide a performance benefit.

TeradataWiki-Teradata RAID1


How RAID 1 Handles Failures 
If a disk fails, the Teradata Database is unaffected and the following are each handled in a different way:
  • Reads
  • Writes
  • Replacements
Reads:  When a drive is down, the system reads the data from the other drive. There may be a minor performance penalty because the read will occur from one drive instead of both.
Writes:  When a drive is down, the system writes to the functional drive. No mirror image exists at this time.
Replacements:  After you replace the failed disk, the disk array controller automatically reconstructs the data on the new disk from the mirror image. Normal system performance is affected during the reconstruction of the failed disk.

RAID 5:
RAID 5 is a data protection scheme that uses parity striping in a disk array to protect data from the failure of a single drive.
For the Teradata Database, RAID 5 uses the concept of a rank, which is a set of disks working together. Note that the disks in a rank are not directly cabled to each other.
RAID 5 also uses some overhead during a write operation, because it has to read the data, then calculate and write the parity

How RAID S Handles Data:

Data is striped across a rank of disks (spread across the disk drives) one segment at a time, using a binary "exclusive-or" (XOR) algorithm.
Parity is also striped across all disk drives, interleaved with the data. A "parity byte" is an extra byte written to a drive in a rank.
The process of writing data and parity to the disk drives includes a read-modify-write operation for each new segment:
1. Read existing data on the disk drives in the rank.
2.Read existing parity in that rank for the corresponding segment.
3.Calculate the parity: existing data + new data + existing parity = new parity.
4.Write new data.
5.Write new parity.
TeradataWiki-Teradata RAID5

If one of the disk drives in the rank becomes unavailable, the system uses the parity byte to calculate the missing data from the down drive so the system can remain operational. With a rank of 4 disks, if a disk fails, any missing data block may be reconstructed using the other 3 disks.

How RAID 5 Handles Failures
If a disk fails, the Teradata Database is unaffected and the following are each handled in different ways:
  • Reads
  • Writes
  • Replacements
Reads: Data is reconstructed on-the-fly as users request data using the binary XOR algorithm.

Writes:  When a drive is down, the system writes to the functional drives, but not to the failed drive.

Replacements:  After you replace the failed disk, the disk array controller automatically reconstructs the data on the new disk, using known data values to calculate the missing data. Normal system performance is affected during reconstruction of the failed disk.

No comments:

Post a Comment