Unix Admin Reference – RAID ( Redundant Array of Independent Disks )


1.  What is RAID?  

RAID is an acronym for Redundant Array of Independent Disks. A RAID system consists of an enclosure containing a number of disk volumes,    connected to each other and to one or more computers by a fast  interconnect. Six levels of RAID are defined: RAID-0 simply consists  of several disks, and RAID-1 is a mirrored set of two or more disks.

The only other widely-used level is RAID-5, which is the subject of    this article. Other RAID levels exist, but tend to be vendor-specific, and there is no generally accepted standard for features included.  RAID applications systems  available for most of the popular UNIX  (including Linux) platforms, and for Windows. Hardware vendors often  provide their own RAID options.

 2.  What does RAID do? Is it same as Backup ?

No. Backup is Something that will start protecting data once we completely write data and then take the backup.  But the main feature of RAID-5 prevents the data loss from the  moment of data creation. If a disk is  lost because of a head crash, for example, the contents of that disk can be reconstituted using the information stored on other disks in the array. In RAID-5, redundancy is provided by error-correcting codes (ECCs) with parity information (to check on data integrity) stored with the data, thus striped across several physical disks.     (The intervening RAID levels between 1 and 5 work in a similar way,  but with differences in the way the ECCs are stored.)

 3.  What are the performance implications of using RAID-5? 

Depending on the application, performance may be better or worse.  The basic principle of RAID-5 is that files are not stored on a  single disk, but are divided into sections, which are stored on a  number of different disk drives. This means that the effective disk spindle speed is increased, which makes reads faster. However, the involvment of more disks and the more complex nature of a write operation means that writes will be slower. So applications where the majority of transactions are reads are likely to give better response times, whereas write-intensive applications may show worse performance. 

Only hardware-based striping should be used on Windows. Software striping, from Disk Administrator, gives very poor performance. 

4.  How does RAID-5 differ from RAID-1?

RAID-1 (mirroring) is a strategy that aims to prevent downtime due  to loss of a disk, whereas RAID-5 in effect divides a file into chunks and places each on a separate disk. RAID-1 maintains a  copy of the contents of a disk on another disk, referred to a  mirrored disk. Writes to a mirrored disk may be a little slower as  more than one physical disk is involved, but reads should be faster  as there is a choice of disks (and hence head positions) to seek  the required location.    

5.  How do I decide between RAID-5 and RAID-1?

RAID-1 is indicated for systems where complete redundancy of data is considered essential and disk space is not an issue. RAID-1 may not be practical if disk space is not plentiful. On a system where uptime must be maximised, Oracle recommends mirroring at least the control files, and preferably the redo log files.

RAID-5 is indicated in situations where avoiding downtime due to disk problems is important or when better read performance is needed and mirroring is not in use. 

6.  Do all drives used for RAID-5 have to be identical?

 Most UNIX systems allow a failed disk to be replaced with one ofthe same size or larger. This is highly implementation-specific, so  the vendor should be consulted. 

 7. Is RAID-5 enough to provide full fault-tolerance?

No. A truly fault-tolerant system will need to have a separate  power supply for each disk to allow for swapping of one disk without having to power down the others in the array. A fully    fault-tolerant system has to be purpose-designed. 

8. What is hot swapping?

This refers to the ability to replace a failed drive without having to power down the whole disk array, and is now considered an  essential feature of RAID-5. An extension of this is to have a hot standby disk that eliminates the time taken to swap a replacement disk in – it is already present in the disk array, but not used  unless there is a problem.

9. What is a logical drive, and how does it relate to a physical drive?  

A logical drive is a virtual disk constructed from one or (usually)  more than one physical disks. It is the RAID-5 equivalent of a UNIX  logical volume; the latter is a software device, whereas RAID-5 uses  additional hardware.

10. What are the disadvantages of RAID-5?

The need to tune an application via placement of ‘hot’ (i.e.  heavily accessed) files on different disks is reduced by using  RAID-5. However, if this is still desired, it is less easy to  accomplish as the file has already been divided up and distributed across disk drives. Some vendors, for example EMC, allow striping in their RAID systems, but this generally has to be set up by the   vendor. There is an additional consideration for Oracle, in that if a database file needs recovery several physical disks may be involved in the case of a striped file, whereas only one would be involved in the case of a normal file. This is a side-effect of the capability of RAID-5 to withstand the loss of a single disk.

11. What variables can affect the performance of a RAID-5 device? 

The major ones are:

      – Access speed of constituent disks

      – Capacity of internal and external buses

      – Number of buses

      – Size of caches

      – Number of caches

      – The algorithms used to specify how reads and writes are done.

12. What types of files are suitable for placement on RAID-5 devices?

Placement of data files on RAID-5 devices is likely to give the best performance benefits, as these are usually accessed randomly. More benefits will be seen in situations where reads predominate  over writes. Rollback segments and redo logs are accessed sequentially (usually for writes) and therefore are not suitable candidates for being placed on a RAID-5 device. Also, datafiles belonging to temporary tablespaces are not suitable for placement on a RAID-5 device. 

Another reason redo logs should not be placed on RAID-5 devices is related to the type of caching (if any) being done by the RAID system. Given the critical nature of the contents of the redo logs, catastrophic loss of data could ensue if the contents of the cache were not written to disk, e.g. because of a power failure, when    Oracle was notified they had been written. This is particularly true of write-back caching, where the write is regarded as having been written to disk when it has only been written to the cache. Write-through caching, where the write is only regarded as having completed when it has reached the disk, is much safer, but still not recommended for redo logs for the reason mentioned earlier.

 13. What about using multiple Database Writers as an alternative to RAID-5? 

Using at least as many DBWR processes as you have database disks will maximize synchronous write capability, by avoiding one disk having to wait for a DBWR process that is busy writing to another disk. However, this is not an alternative to RAID-5, because it improves write efficiency. And RAID-5 usually results in writes being slower.








I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

2 Responses

  1. September 15, 2015

    […] Unix Admin Reference – RAID ( Redundant Array of Independent Disks ) […]

  2. September 16, 2015

    […] Read – RAID Concepts Beginners Guide […]

What is in your mind, about this post ? Leave a Reply

  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us