RAID
In this chapter you will learn how to create and manage xiRAID RAID objects.
Creating the RAID
You can create the RAID with the command
# xicli raid create <args> [optional_args]
For the argument descriptions, see the table below. For recommendations on configuring RAID settings, see the General Configuration Recommendations chapter.
Creating xiRAID RAID over xiRAID RAID devices is not allowed. To pool a large number of drives into a single address area, use RAIDs 10, 50, 60, 70.
Minimum number of drives required to create a RAID:
- of levels 5, 6, or 7 – at least 4 drives;
- of level 10 – at least 2 drives (the number of drives must be even);
- of level 0 – at least 1 drive;
- of level 1 – at least 2 drives;
- of levels 50, 60, or 70 – at least 8 drives (make sure the total drives number is multiple of the --group-size parameter value);
- of level N+M – at least 8 drives.
Creating xiRAID RAIDs requires at least 1024 MiB of RAM.
Required arguments |
||
-n |
--name |
The name of the RAID. |
-l |
--level |
The level of the RAID: 0, 1, 5, 6, 7, 10, 50, 60, 70, or nm. |
-d |
--drives |
The list of block devices (/dev/sd*, /dev/mapper/mpath*, /dev/nvme*, /dev/dm-*) separated by a space. |
-gs |
--group_size |
Only for RAIDs 50, 60, or 70. The number of drives for one RAID group of level 5, 6, or 7.3 of the appropriate RAID 50, 60, or 70. Possible values are integers from 4 to 32. |
-sc |
--synd_cnt |
Only for RAIDs N+M. The number of syndromes M. Possible values are integers from 4 to 32. Additional conditions: N+M ≤ 64 and M ≤ N. |
Optional arguments |
||
-bs |
--block_size |
RAID block size: 512 or 4096 bytes. The default: 4096. |
-inp |
--init_prio |
Except RAID 0. Initialization priority in %. Possible values are from 0 to 100 (maximum rate of initialization). The default: 100. |
-mwe |
--merge_write_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the Merge function for write operations. The default: 0. |
-mre | --merge_read_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the Merge function for read operations. The default: 0. |
-ml |
--memory_limit |
RAM usage limit in MiB. Possible values: 0 and integers from 1024 to 1048576. The 0 value sets unlimited RAM usage. The default: 0. |
-mm |
--merge_max |
Except RAIDs 0, 1, 10. Maximum wait time (in microseconds) for stripe accumulation for the Merge functions. Possible values: integers from 1 to 100000. The default: 1000. |
-mw |
--merge_wait |
Except RAIDs 0, 1, 10. Wait time (in microseconds) between requests for the Merge functions. Possible values: integers from 1 to 100000. The value must be less than the merge_max value. The default: 300. |
-rcp |
--recon_prio |
Except RAID 0. Reconstruction priority in %. Possible values are from 0 to 100 (maximum rate of reconstruction). The default: 100. |
-re |
--resync_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the Resync function. The default: 1. |
-rl |
--request_limit |
Number of simultaneous I/O requests on RAID. Possible values: from 0 (unlimited) to 4294967295. The 0 value disables the restriction. The default: 0. |
-rsp |
--restripe_prio |
Restriping priority in %. Possible values are from 0 to 100 (maximum rate of restriping). The default: 100. |
-se |
--sched_enabled |
Enable (1) or disable (0) the scheduling function. The default: 0. |
-sp |
--sparepool |
Name of the spare pool to assign to the RAID. |
-ss |
--strip_size |
Strip size in KiB. Possible values: 16, 32, 64, 128, or 256. The default: 16. |
Example: Create the RAID 5 named ”media5” over 4 NVMe drives — ”nvme0n1”, ”nvme1n1”, ”nvme2n1”, ”nvme3n1”, with strip size equal to 64 KiB and enabled Merge function for write operations.
# xicli raid create -n media5 -l 5 -d /dev/nvme0n1 /dev/nvme1n1
/dev/nvme2n1 /dev/nvme3n1 -ss 64 -mwe 1
Showing RAID State
You can view info about the RAID with the command
# xicli raid show [optional_args]
Optional arguments |
||
-n |
--name |
The name of the RAID. Without the argument, show info on all xiRAID RAIDs. |
-o |
--online |
Only show RAIDs that are in the “online” state (RAIDs that were not unloaded by the raid unload command). The argument takes no value. |
-u |
--units |
Dimension:
The default: g. |
-f |
--format |
Output format:
The default: table. |
-e |
--extended |
Show extended output. The argument takes no value. |
Example: Show information on the ”media5” RAID:
# xicli raid show -n media5 -e
Row | Description |
---|---|
name |
RAID name. |
static |
Static RAID parameters:
|
state |
RAID state:
|
devices |
The list of devices included in the RAID, and their current states:
|
health |
To show, use the command with the -e parameter. Percent of valid drive data. When health is 100% – no reconstruction required. |
wear |
To show, use the command with the -e parameter. The wear percentage of the SSD or NVMe drive. When the drive reaches the 90% threshold, the system sends an error message to the mail. The S.M.A.R.T. values "Percentage used endurance indicator" and "Percentage Used" are used to check SSD and NVMe drives respectively. |
serials |
To show, use the command with the -e parameter. Serial numbers of drives in RAID. |
params |
To show, use the command with the -e parameter. Editable RAID parameters:
|
info |
Dynamic RAID values:
|
Deleting the RAID
Warning! The result of the command is irreversible. Read the description carefully.
You can delete the RAID without possibility to restore the RAID and data on it with the command
# xicli raid destroy <arg> [optional_args]
Mutually exclusive required arguments |
||
-n |
--name |
The name of the RAID. |
-a |
--all |
Delete all the xiRAID RAIDs. The argument takes no value. |
Optional arguments | ||
--force | Force the command execution. | |
--config_only | Remove RAID only from config. |
Example: Deleting the RAID ”media5”:
# xicli raid destroy -n media5
Unloading the RAID
You can remove (unload) the RAID with possibility to restore the RAID and save data on it with the command
# xicli raid unload <arg>
Mutually exclusive required arguments |
||
-n | --name |
The name of the RAID. |
-a | --all |
Unload all available xiRAID RAIDs. The argument takes no value. |
Example: Unloading the RAID ”media5”:
# xicli raid unload -n media5
To restore unloaded RAIDs, run:
# xicli raid restore {-n <raid_name>|-a}
RAID Reconstruction
Reconstruction of a RAID (except RAID 0) starts automatically after a drive has been replaced in the RAID. While a RAID is being reconstructed, the functions initialization and restriping are paused.
To improve the system performance under the workload, try decreasing reconstruction priority by changing the corresponding RAID parameter.
To start the RAID reconstruction, run
# xicli raid recon start <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
To stop the RAID reconstruction, run
# xicli raid recon stop <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
Example: Start RAID “media5” reconstruction:
# xicli raid recon start -n media5
RAID Initialization
Initialization will start automatically after a RAID (except RAID 0) is created.
To improve the system performance under the load, try decreasing initialization priority by changing the corresponding RAID parameter.
The random write performance is higher on an initialized RAID.
To start or continue the RAID initialization, run
# xicli raid init start <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
To stop the RAID initialization, run
# xicli raid init stop <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
Example: Start initialization of the RAID ”media5”:
# xicli raid init start -n media5
Increasing Size and Changing Level of RAID
In this chapter, you will learn about the following RAID operations:
- Changing the RAID level with the addition of new disks.
- Increasing the size of a RAID by adding new disks.
- Increasing the size of a RAID by replacing its disks with larger disks (vertical scaling RAID operation).
RAID operations that add new disks to a RAID consist of two steps: restriping (raid restripe command), which selects the disks to be added and the RAID level, and resizing (raid resize subcommand), which applies changes to the RAID (which is in need_resize status).
For an operation to increase the size of the RAID through larger disks, only a resize (raid resize command) is required.
Requirements and Specifics of Restriping and Resizing
Requirements and specifics:
- Except RAID N+M.
- Only one RAID can be restriped at a time.
- To improve the performance of your system under workload, try to change the priority of restriping by changing the corresponding RAID parameter.
-
RAID state must not be one of the following:
- offline;
- need_restripe;
- restriping;
- degraded.
The RAID level can only be changed if the number of added drives is sufficient to fit all the data stored prior to the level change. The number of data drives in a group must not decrease. Note that for RAID levels 50, 60, and 70, the total number of drives must be a multiple of the group size. Please keep in mind that RAID 50 includes one syndrome drive per group, while RAID 60 has two and RAID 70 has three. These drives do not store information but are necessary for data recovery in case of loss.
Example: Adding 1 drive to a RAID 60 configuration with 14 disks and 2 groups is not feasible. The only possible configuration for 15 drives is 3 groups of 5 drives, with only 3 of them containing data. Performing this operation would result in a new RAID with fewer data drives, hence it cannot be done. However, it is possible to add 2 drives to create a new RAID configuration consisting of 2 groups, each containing 8 drives (2 syndrome and 6 data drives). This will increase the data storage space.
Current level |
New level |
Requirements |
Minimal number of drives you should add |
---|---|---|---|
RAID 0 |
RAID 0 | 1 | |
RAID 1 |
RAID 0 must contain only 1 drive. |
1 |
|
RAID 10 |
RAID 0 contains only 1 drive. |
3 | |
RAID 0 contains more than 1 drive | The number of drives to be added must be equal to the number of drives in the RAID 0. | ||
RAID 1 |
RAID 1 | 2 | |
RAID 10 |
2 | ||
RAID 5 |
2 | ||
RAID 10 |
RAID 10 | 4 | |
RAID 5 |
1 | ||
RAID 50 |
The number of RAID 50 disks must be a multiple of its group size. |
1 | |
RAID 5 |
RAID 5 | 1 | |
RAID 6 |
1 | ||
RAID 10 |
The number of RAID 10 disks must be an even number. The number of information disks in a group must not decrease. |
1 | |
RAID 50 |
The number of disks in RAID 50 must be at least 8. The number of disks in RAID 50 must be a multiple of its group size. The number of information disks in a group must not decrease. |
1 | |
RAID 6 |
RAID 6 | 1 | |
RAID 7.3 |
1 | ||
RAID 60 |
The number of disks in RAID 60 must be at least 8. The number of disks in RAID 60 must be a multiple of its group size.The number of information disks in a group must not decrease. |
1 | |
RAID 7.3 |
RAID 7.3 | 1 | |
RAID 70 |
The number of disks in RAID 70 must be at least 8. The number of disks in RAID 70 must be a multiple of its group size.The number of information disks in a group must not decrease. |
1 | |
RAID 50 |
RAID 50 | The number of disks in RAID 50 must be a multiple of its group
size. The number of information disks in a group must not decrease. |
1 |
RAID 60 |
The number of disks in RAID 60 must be at least 8. The number of disks in RAID 60 must be a multiple of its group size.The number of information disks in a group must not decrease. |
1 | |
RAID 60 |
RAID 60 | The number of disks in RAID 60 must be a multiple of its group
size. The number of information disks in a group must not decrease. |
1 |
RAID 70 |
The number of disks in RAID 70 must be at least 12. The number of disks in RAID 70 must be a multiple of its group size.The number of information disks in a group must not decrease. |
1 | |
RAID 70 | RAID 70 | The number of disks in RAID 70 must be a multiple of its group
size. The number of information disks in a group must not decrease. |
1 |
raid restripe
The chapter describes the available subcommands for the restripe operation.
Restriping refers to any change in RAID configuration, such as the position of checksums or data drives, with the aim of changing the RAID level or size.
To start RAID restriping, run
# xicli raid restripe start <args>
Required arguments |
||
-n |
--name |
The name of the RAID. |
-l |
--level |
The new level for the RAID. If you are only increasing the RAID size, enter the current RAID level for this argument. |
-gs |
--group_size |
Only for RAIDs 50, 60, and 70. The new group size for the RAID. Possible values: integers from 4 to 32. |
-d |
--drives |
The list of block devices (/dev/sd*, /dev/mapper/mpath*, /dev/nvme*, /dev/dm-*) separated by a space to add to the RAID. |
To pause RAID restriping, run
# xicli raid restripe stop <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
To continue RAID restriping, run
# xicli raid restripe continue <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
raid resize
The chapter describes the command for the resizing operation.
Following the restriping process, the RAID goes into the 'need resize' state. We recommend starting the resizing operation in order to restore optimal system speed.
We recommend that you run the raid resize command when there is no or minimal workload on the RAID.
# xicli raid resize <arg>
Required argument |
||
-n |
--name |
The name of the RAID. |
Examples of Restriping and Resizing
Example: Restripe the RAID “media5” by adding a new drive /dev/sdi without changing the RAID level (increasing the RAID size):
# xicli raid restripe start -n media5 -l 5 -d /dev/sdi
Example: Increasing the RAID "media5" size by replacing the drives (3 GB each) with drives of larger size (5 GB each: /dev/sde, /dev/sdf, /dev/sdg, /dev/sdh):
In this example, the RAID size will be increased from 9 GB to 15 GB.
Perform a RAID replacement and reconstruction for each drive in a turn, waiting for reconstruction to complete:
-
Change the first drive:
# xicli raid replace -n media5 -no 0 -d /dev/sde
Reconstruction starts automatically after the drive replacement. Wait for reconstruction to complete.
-
Change the second drive:
# xicli raid replace -n media5 -no 1 -d /dev/sdf
Reconstruction starts automatically after the drive replacement. Wait for reconstruction to complete.
-
Change the third drive:
# xicli raid replace -n media5 -no 2 -d /dev/sdg
Reconstruction starts automatically after the drive replacement. Wait for reconstruction to complete.
-
Change the fourth drive:
# xicli raid replace -n media5 -no 3 -d /dev/sdh
Reconstruction starts automatically after the drive replacement. Wait for reconstruction to complete.
-
Run resize:
# xicli raid resize -n media5
RAID size is increased to 15 GB, RAID is in the need_init state.
Example: Restriping of the “media5” RAID with adding new drives /dev/sdf /dev/sdg /dev/sdh and RAID level changing from 5 to 6:
# xicli raid restripe start -n media5 -l 6 -d /dev/sdf /dev/sdg
/dev/sdh
After restriping is finished, the RAID state is need_resize until you run
# xicli raid resize -n <raid_name>
Changing RAID Parameters
To improve the system performance under the workload, try decreasing initialization, reconstruction, or restriping priorities.
See recommendations on configuring RAID parameters in the chapter RAID and System Setup Recommendations.
To change the RAID dynamic parameters, run:
# xicli raid modify <arg> [optional_args]
Required argument |
||
-n |
--name |
The name of the RAID. |
Optional arguments |
||
-inp |
--init_prio |
Except RAID 0. Initialization priority in %. Possible values are from 0 to 100 (maximum rate of initialization). The default: 100. |
-mwe |
--merge_write_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the Merge function for write operations. The default: 0. |
-mre | --merge_read_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the Merge function for read operations. The default: 0. |
-ml |
--memory_limit |
RAM usage limit in MiB. Possible values: 0 and integers from 1024 to 1048576. The 0 value sets unlimited RAM usage. The default: 0 (unlimited). |
-mm |
--merge_max |
Except RAIDs 0, 1, 10. Maximum wait time (in microseconds) for stripe accumulation for the Merge functions. Possible values: integers from 1 to 100000. The default: 1000. |
-mw |
--merge_wait |
Except RAIDs 0, 1, 10. Wait time (in microseconds) between requests for the Merge functions. Possible values: integers from 1 to 100000. The value must be less than the merge_max value. The default: 300. |
-rcp |
--recon_prio |
Except RAID 0. Reconstruction priority in %. Possible values: from 0 to 100 (maximum rate of reconstruction). The default: 100. |
-re |
--resync_enabled |
Except RAIDs 0, 1, 10. Enable (1) or disable (0) the resync function. The default: 1. |
-rl |
--request_limit |
Number of simultaneous I/O requests on RAID. Possible values: integers from 0 to 4294967295. The 0 value disables the restriction. The default: 0. |
-rsp |
--restripe_prio |
Restriping priority in %. Possible values are from 0 to 100 (maximum rate of restriping). The default: 100. |
-se |
--sched_enabled |
Enable (1) or disable (0) the scheduling function. The default: 0. |
-sp |
--sparepool |
Name of the spare pool to assign to the RAID. The null value removes the spare pool from the RAID. Spare pool can not be assigned to RAID 0. |
--force_online |
Change RAID state to online if the RAID has unrecoverable sections. I/O operations on unrecoverable sections may lead to data corruption. The argument takes no value. |
|
--force_resync |
Force RAID re-initialization. The argument takes no value. |
Example: Setting reconstruction priority for the RAID ”media5” equal to 50%:
# xicli raid modify -n media5 -rcp 50