# RAID Groups

<a id="creating-a-raid-group"></a>

## Creating a RAID Group

VPSA RAID Groups define the level of protection against disk failure of the
Pools and Volumes which contain the user’s data. Careful consideration must be
given when selecting the RAID level, along with the number and type of drives,
in order to avoid potential impact on performance of your data. RAID groups
always span across drives from
different Storage Nodes, thus a RAID Group is resilient to both a
single drive failure, as well as
to a complete Storage Node failure.

To create your RAID Groups first select the Drives entity in the Main
Navigation Panel (Left Panel) and then click the Create RAID Group
button in the Center Panel.

Define the following attributes in the “Create RAID Group” dialog box:

- Enter the RAID Group name (you will later add it to a Pool so you may
  want to provide a meaningful name that describes the target usage of
  the Pool).

- Select Protection Type. Refer to the table below for a
  description of the various RAID levels.
- Select whether to allocate a drive as a Hot Spare for this RAID
  group.  Adding Spare drive for RAID-1 groups is recommended.
  See [Understanding Hot Spare Drives](#understanding-hot-spare-drives) for more details about managing **Hot Spares**.
- Select the drives that will participate in the RAID Group. As noted
  in the table below, for RAID-1 a minimum of 2 drives is required.
- For maximum redundancy drives MUST be selected from different
  Storage Nodes so the VPSA will prevent you from doing otherwise.
- It is possible **but not recommended** to mix drives of different types
  in a single RAID Group.

### Understanding RAID levels

The following RAID levels are supported:

| **RAID level**                    | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| RAID-1  (Mirroring)               | RAID-1 mirrors the contents of one hard drive in the group onto another. If either hard drive fails, the other hard drive takes over and normal system operations are not interrupted. RAID-1, or Drive Mirroring, creates fault tolerance by storing duplicate sets of data on a minimum of two hard drives, and offers an excellent combination of data protection and performance. There must be 2 or 3 drives in a RAID-1 group. RAID-1 and RAID-10 are the most costly fault tolerance methods because they require 50 percent of the total combined drives capacity to store the redundant data.                                                                                                                                                                                                                 |
| RAID-10  (Mirroring and Striping) | RAID-10, or Drive Mirroring and Striping, is achieved in a VPSA by creating RAID-1 RAID Groups and striping them together at the Pool level. RAID-10 first mirrors each drive in the array to another, and then stripes the data across the mirrored pair. If a physical drive fails the mirror drive takes over and normal system operations are not interrupted. RAID 10 can withstand multiple simultaneous drive failures, as long as the failed drives are not mirrored to each other. RAID-10 creates fault tolerance by storing duplicate sets of data on a minimum of four hard drives and offers the best combination of data protection and performance. RAID-10 is the most costly fault tolerance method because it requires 50 percent of the total combined drives capacity to store the redundant data. |

## Deleting a RAID Group

The VPSA administrator can delete delete a specific RAID Group if it not
needed by clicking the **Delete** option under the RAID Group’s top option
menu.

## RAID Group Media Scan

The VPSA performs regular media scans on the drives within each RAID group.
A media scan is a proactive maintenance process that scans the underlying
drives, identifies potential issues, and automatically tries to correct
media errors when detected.

To minimize performance impact, the scans are performed on a RAID group
basis with a rate limit, ensuring that the process is efficient and has
minimal impact on the drives performance.

By default, the media scan is scheduled to run once a month, at 1:00am on
a system-calculated different day of the month per VPSA in the same cloud.

To view or modify the automatically scheduled media scans,
see [Media Scan Settings](#media-scan-settings).

To bypass the automatically scheduled media scans, and trigger an on-demand immediate
media scan, pause or resume a media scan on a specified RAID Group
(whether a scheduled or on-demand scan),
see [Starting, Pausing or Resuming a Media Scan](#start-pause-resume-media-scan).

<a id="media-scan-settings"></a>

### Media Scan Settings

To view the VPSA’s media scan settings:

1. In the navigation tree, select **Resources > RAID Groups**.

   While a media scan is in progress on a RAID Group, its Status displays
   **Media Scan** and the scan’s progress percentage.

   On completion of the media scan, the RAID Group’s Status changes to
   **Normal**.
2. In the **RAID Groups** window’s top toolbar, select **Media Scan Settings**.

   The **Media Scan Settings** dialog opens.

To modify the VPSA’s media scan settings:

1. Adjust the relevant settings:
   * **Periodic Media Scan**:

     Toggle to activate or disable the scheduled periodic media scan.

     Default: **ON**
   * **Media Scan Schedule**

     Frequency of automatically scheduled RAID Groups media scans.

     One of:
     * **Weekly**

       Custom option to schedule media scans to automatically run
       on a user-selected **Day of week** (Sunday - Saturday) at 1:00am.
     * **Monthly** (default)

       Media scans run automatically on the **Day of month** (1 - 28) at
       1:00am.

       The default day of the month is system-calculated and differs
       between VPSAs in the same cloud, for the purpose of balancing the
       overhead.
       It can be overwritten by a user-selection.

       The **Day of month**  range is restricted to 1 - 28, to avoid
       discrepancies between longer and shorter months.
2. Optionally, click **Default** to reset the settings to their defaults.
3. Click **Submit** to save the changes, or **Cancel** to exit without
   applying changes to the settings.

<a id="start-pause-resume-media-scan"></a>

### Starting, Pausing or Resuming a Media Scan

The VPSA supports the option to bypass its automatically scheduled media
scans:

* [Starting a Media Scan](#starting-media-scan) an on-demand immediate media scan on a specified RAID Group,
  irrespective of whether the **Periodic Media Scan** toggle is activated
  or disabled.
* [Pausing a Media Scan](#pausing-media-scan) or [Resuming a Media Scan](#resuming-media-scan) on a specified
  RAID Group, irrespective of whether the media scan is a scheduled or
  an on-demand scan.

<a id="starting-media-scan"></a>

#### Starting a Media Scan

To start an on-demand immediate media scan on a RAID Group:

1. In the navigation tree, select **Resources > RAID Groups**.
2. In the **RAID Groups** window, select the RAID Group.
3. In the **RAID Groups** window’s top toolbar, select **Start Media Scan**.

   In the **Confirm** dialog, confirm starting an on-demand immediate media scan
   for the selected RAID Group.

   The RAID Group’s Status changes to **Media Scan**.

   On completion of the media scan, the RAID Group’s Status changes to
   **Normal**.

<a id="pausing-media-scan"></a>

#### Pausing a Media Scan

To pause a media scan in progress on a RAID Group:

1. In the navigation tree, select **Resources > RAID Groups**.
2. In the **RAID Groups** window, select the RAID Group.

   The RAID Group’s Status displays **Media Scan**.
3. In the **RAID Groups** window’s top toolbar, select **Pause Media Scan**.

   In the **Confirm** dialog, confirm pausing the media scan that is in
   progress on the selected RAID Group.

   The RAID Group’s Status changes to **Media Scan paused**.

<a id="resuming-media-scan"></a>

#### Resuming a Media Scan

To resume a paused media scan:

1. In the navigation tree, select **Resources > RAID Groups**.
2. In the **RAID Groups** window, select the RAID Group.

   The RAID Group’s Status displays **Media Scan paused**.
3. In the **RAID Groups** window’s top toolbar, select **Resume Media Scan**.

   In the **Confirm** dialog, confirm resuming the paused media scan
   for the selected RAID Group.

   The RAID Group’s Status changes to **Media Scan**.

   On completion of the media scan, the RAID Group’s Status changes to
   **Normal**.

## Viewing RAID Group properties

The RAID-Group’s details (properties and metering), are shown in the
South Panel tabs:

**Properties**

Each RAID Group includes the following properties:

| **Property**       | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                   |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ID                 | An internally assigned unique ID.                                                                                                                                                                                                                                                                                                                                                                                                 |
| Name               | User assigned name. Can be modified anytime.                                                                                                                                                                                                                                                                                                                                                                                      |
| Comment            | User free text comment. Can be used for labels, reminders or any other purpose                                                                                                                                                                                                                                                                                                                                                    |
| Protection         | Selected RAID level - RAID-1.                                                                                                                                                                                                                                                                                                                                                                                                     |
| Capacity           | Total protected and usable capacity of the RAID Group.                                                                                                                                                                                                                                                                                                                                                                            |
| Available Capacity | The RAID Group’s usable capacity that is not allocated to any Pool.                                                                                                                                                                                                                                                                                                                                                               |
| Mirror Number      | Number of mirror copies for RAID-1.                                                                                                                                                                                                                                                                                                                                                                                               |
| Status             | - Normal – All drives are in sync<br/>- Resyncing X% – The RAID is in an initial rebuild process.<br/>- Degraded – One of the drives have failed.<br/>- Degraded Resyncing X% – The RAID is resyncing data following a drive recovery\\replacement.<br/>- Repairing X% – Media Scan is in progress.<br/>- Repairing Paused – Media Scan is paused.<br/>- Failed – The array has lost too many drives and cannot serve Server IOs. |
| Created            | Date & time when the object was created.                                                                                                                                                                                                                                                                                                                                                                                          |
| Modified           | Date & time when the object was last modified.                                                                                                                                                                                                                                                                                                                                                                                    |

**Drives**

Lists the disk Drives participating in the selected RAID Group. The
following information is displayed per drive:

- Name
- Capacity (in GB)
- Location (Storage Node)
- Type (SAS/SATA/SSD/TBD)
- Status (Normal/Failed/TBD)
- Hot Spare (Yes/No)

**Metering**

The Metering Charts provide live metering of the IO workload associated
with the selected RAID Group.

The charts display the metering data as it was captured in the past 20
intervals. An interval length can be one of the following: 1 second, 10 Seconds,
1 minute, 10 minutes, or 1 hour. The Auto button lets you see
continuously-updating live metering info.

The following charts are displayed:

| **Chart**         | **Description**                                                                                           |
|-------------------|-----------------------------------------------------------------------------------------------------------|
| IOPs              | The number of read and write commands issued to the RAID Group per second.                                |
| Bandwidth (MB\\s) | Total throughput (in MB) of read and write SCSI commands issued to the RAID Group per second.             |
| IO Time (ms)      | Average response time of all read and write SCSI commands issued to the RAID Group per selected interval. |

**Logs**

Displays all event logs associated with this RAID Group.

<br/>

<a id="understanding-hot-spare-drives"></a>

## Understanding Hot Spare Drives

When creating a RAID Group, you can decide whether you’d like to
allocate hot spare drives to the RAID Group or not. You can change this
selection at any time by clicking the **Add Spare** or **Remove Spare**
buttons on a selected RAID Group in the VPSA GUI’s **RAID Groups**
page.

Allocating a hot spare drive for a RAID Group allows for immediate and
automated drive replacement, with no human intervention, once the VPSA
determines that the drive has failed.

If you choose not to allocate a hot spare drive to your RAID group, you
can still replace a failed drive with any available drive that is not
used in any other RAID Group within the VPSA. You can execute this
process manually, or automate it via the VPSA REST APIs. Simply identify
and select the failed drive, click the Replace button and select
the available drive to use for the replacement. For more details see
[Replacing a Drive](drives.md#replacing-a-drive).

<br/>

## Managing RAID Group Sync Speed

The RAID Group **Sync Speed** button allows you to control the rate with which data is
synchronized during a RAID rebuild process on both a newly created RAID
group and following a drive replacement.

Setting the Sync Speed is a tradeoff between the need to complete the
RAID rebuild as quickly as possible in order to return to full
redundancy level and the ability to supply good response time and
throughput for application IOs. Therefore, the VPSA allows you to
control two parameters impacting the sync Speed:

- “**Min Speed During Host I/Os**” – Controls the RAID sync speed
  when there are Server IOs. You will want to set it low if the
  Server’s IOs are the priority. Set it high if you want to prioritize
  the RAID rebuild process.
  - Default value: 10 MiB/s
- “**Max Speed w/o Host I/Os**” – Controls the sync speed when
  there are no Server IOs. You would typically set it to max value (500
  MB/s), unless it consumes too much of the VPSA’s resources
  (depending on the Engine type) which impacts the performance of other
  RAID Groups (which do have active Server IOs).
  - Default value:
    - HDD: 30 MiB/s
    - SDD: 100 MiB/s
  - Maximum value:
    - HDD: 100 MiB/s
    - SDD: 500 MiB/s

You can set and modify Sync Speed at any time, and it can vary between
RAID groups. The Sync Speed also applies to Media Scan.
