RAID (Redundant Array of Inexpensive Disks) levels like 1, 5, and 6 are commonly used in CCTV systems to increase reliability and performance of recorded video storage. RAID 1 uses mirroring to protect against single drive failures. RAID 5 and 6 use striping with parity across drives to allow continued operation if one or two drives fail. Hardware RAID controllers provide better performance than software solutions. While RAID improves reliability over a single drive, it does not replace full system backups which protect against other types of failures.
1. RAID in the CCTV Industry
RAID, or “Redundant Array of Inexpensive Disks”, is used to increase performance
and/or reliability of recorded video surveillance footage. There are several different
levels of RAID but I have highlighted the ones below that work best in the CCTV
industry.
Level Description Minimum # of
drives
Fault Tolerance
0 Stripped RAID 2 None
1 Mirrored RAID 2 n – 1
5 Striping with parity 3 One drive
6 Striping with double
parity
4 (5 recommended) Two drives
10 Raid 1 + 0 (mirror +
stripes)
4 m-1 per span
The RAID can be controlled by either hardware (a RAID controller card) or software.
Some versions of Windows, such as 7 Pro and Server 2012, include software RAID
functionality. Hardware RAID controllers can be expensive but they offer better
performance and reliability, especially with RAID levels 5 and 6.
You can also use a RAID controller card as an interface to connect other drives - in this
case, the drives not part of a RAID would be called “JBOD” or “Just a Bunch Of Disks”.
Raid 0 – Striping
Raid 0 is not commonly used in the CCTV industry, because if one drive fails all of the
data is lost. However, RAID 0 offers superior performance to the other RAID levels. It is
2. not recommended for use at all in CCTV and video surveillance, but it is commonly
used for Windows Solid State Drives (SSDs), so customers may request it.
The performance benefits for the operating system are not necessarily beneficial for
CCTV, though you could use this type of RAID for data storage if your customer is not
worried about data retention. If, for example, they wanted a RAID level of 0 for their
system, data would be backed up nightly to another server.
Advantages:
- Great performance, both in read and write operations
- There is no overhead caused by parity
- All storage capacity is used
- Easy to implement
Disadvantages:
- No fault tolerance
Raid 1 – Mirror
3. The most common use for RAID 1 in the CCTV industry is used on the SSDs for
Windows. In RAID 1, all of the data is stored twice by writing information to both of the
data drives (or set of drives). If one drive fails, the controller will use the other drive to
continue operating. When the failed drive is replaced with a new one, it will begin
mirroring the data as it had before.
Advantages:
- Excellent read and writing speed - almost comparable to a single drive
- Simple technology that is easy to implement
- Increases reliability of NVR
- If a drive fails the data does not need to be rebuilt, it is simply copied from
one drive to the next
- Ideal for use on the Windows OS
Disadvantages:
- Storage capacity is only half of the total drive capacity
- Software solutions such as Windows 7 does not allow a drive to be hot
swapped - the drive can only be replaced by stopping recording and powering
off the NVR. It is recommended to use a RAID controller to avoid this IF the
operating system drives are hot swappable
- Not ideal for data storage as half the space is lost
Raid 5
4. This is the most common level of RAID - it will require at least 3 drives but can work with
up to 16 drives depending on the controller card and drive capacity of the NVR. Data is
striped across the drives, and on the final drive a parity bit is written for that data block.
The parity is not written to a fixed drive, they are spread across all drives. Using the
parity, the NVR can recalculate the data and can thus withstand a single drive failure
without losing any recorded video. Although RAID 5 can be achieved in software, a
hardware controller is highly recommended for CCTV applications do to the large
amount of data constantly being written to the drive.
Advantages:
- Playback performance is very fast
- If one drive fails you still have access to all of the recorded video, even while
the drive is being replaced and the storage controller rebuilds the data on the
new drive
- You only lose the capacity of 1 drive in the RAID.
o 3 x 6TB drives would yield 12TB
o 4 x 6TB would yield 18TB
Disadvantages:
- Writing recorded data is slower due to the parity that has to be calculated,
however our NVR’s offer high end Areca Controller cards that bring the
performance back to an acceptable level and is greater than a single drive
connected to a motherboard controller
- This is a very complex technology - if a drive fails, the rebuild time could take
days. If a second drive fails during this time, all of the data is lost forever and
cannot be recovered
5. RAID 6 – Striping with double parity
RAID 6 is very similar to RAID 5, but now we reserve 2 drives for the parity bit.
This means that it requires at least 4 drives and can withstand 2 drives dying at
the same time (or a second drive dying during the rebuild cycle).
Advantages:
- Like RAID 5, playing back footage is very fast
- If two drives fail you will still have access to your data, even while the drives
are being replaced
- Preferred over RAID 5 because it allows a second drive failure
Disadvantages:
- Writing recorded footage is slowed due to the parity that has to be calculated.
Like RAID 5, this can be improved by using a quality controller card
- When a drive fails, performance will be degraded until replaced and rebuilt
- Like RAID 5, rebuilding an array can take a long time
- You lose the capacity of 2 drives and require at least 4 drives
o 4 x 6TB would yield only 12TB of storage, the same as a mirrored
RAID
o 5 x 6TB would yield 18TB of storage
o 6 x 6TB would yield 24TB of storage
o As such it can work with a minimum of 4 drives but it is recommended
to have at least 5 when using this technology
Raid 10 – Combining RAID 1 and Raid 0
6. It is possible to combine the advantages and disadvantages of RAID 1 and 0 into RAID
10. This is considered a nested or hybrid RAID, and not all storage controllers will
support this option. No software options currently support it. RAID 10 provides
redundancy for footage by mirroring all data on secondary drives, while incorporating
striping across each set of drives to speed up data transfers.
Advantages:
- If one drive fails, the rebuild time is very fast as all that is needed is copying
all the video from the surviving drive to the new drive - which can take as little
as 30 minutes per 1 TB compared to multiple days on a RAID 5 or 6
Disadvantages:
- Half of the storage capacity goes to mirroring so compared to RAID 5 or 6,
this is an expensive way to have redundancy.
- However in smaller configurations of say 4 drives this would be preferred over
RAID 6 for the higher performance and equal capacity.
o 4 x 6TB would yield 12TB of storage (Compared to 12TB on RAID 6 or
18TB on RAID 5)
o 6 x 6TB would yield 18TB of storage (Compared to 24TB on RAID 6 or
30TB on RAID 5)
7. Other levels of RAID:
Other levels of RAID do exist - such as 2, 3, 4 and 7, but they are not widely used in any
industry, especially CCTV. If, for example, you were looking into RAID 3, you would
find that it is the same as RAID 5, but with the parity bit always written to the same
drive.
Is RAID a back-up?
While all RAID levels except for RAID 0 offer protection from 1 or more drive failures, it
is not considered a backup.
- A power surge at any time could cause all drives to fail
- If the system is stolen, all of the data is lost
- Backups are normally kept offsite to protect against fire, flooding, etc.
- Backups generally have multiple generations of footage. For example, you
would backup all of the footage from 2014, 2015, etc. The RAID will be limited
to the footage that is currently on the machine, and data is constantly lost as
new video is stored
- If someone deletes footage to cover something up, it will be deleted from all
drive instantly - a backup would leave another copy onsite on another server
Spare Drives:
It is quite common to see a request for a spare drive. For example:
- Raid 5 – 6 x 6TB Hard drives Plus 1 spare
Spare drives help to minimize the duration of damage on RAID. Once a drive fails, it
uses a spare drive that was installed into the system to rebuild the array automatically.
When the rebuild is complete, the failed drive is marked as failed and the spare
becomes a part of the RAID. The failed drive can be replaced with a new drive when
time permits. If, for example, a drive failed on Saturday and nobody could get onsite
until Monday the RAID would already be rebuilt by the time someone is onsite.
The downside to using this approach is that hard drives generally fail with age as they
get worn out. The rebuild phase is very drive-intensive and could potentially cause
another drive to fail. The ideal approach would be:
1. Perform a data backup of all footage
2. Replace the failed hard disk
3. Start the rebuild of the RAID
This gives the lowest possible chance of a complete data loss. When using a spare
drive in a RAID, you can skip the first 2 steps of this process and go straight to the
rebuild. In an application that puts a premium on the NVR continuing to record live video
over having video retention, this might be an acceptable risk.