A RAID array card with automatic adjustment of the number of array hard disks
By introducing idle status monitor, capacity occupancy calculator and hard disk allocation calculator into RAID array cards, the number of hard disks is automatically detected and adjusted, and the problem of cumbersome adjustment of hard disks in daily use of RAID array cards is solved, improving operational convenience.
Patent Information
- Application Number
- CN202211494081.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Existing RAID array cards require manual reallocation of hard disks to adjust array capacity during daily use, resulting in cumbersome and costly operation.
Introduce idle status monitor, capacity occupancy calculator, hard disk allocation calculator and data migration to automatically detect and adjust the number of hard disks in the RAID array card, communicate with the upper computer through PCIE and SATA interfaces, and automatically adjust the number of hard disks.
It realizes automatic adjustment of the number of hard disks for RAID array cards, reduces manual operation process, and improves the convenience and efficiency of use.
Smart Images

Figure CN115878031B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of storage, and in particular relates to a RAID array card capable of automatically adjusting the number of array hard disks. Background Art
[0002] RAID array cards can organize multiple hard drives into a complete storage space, called an array. Arrays can be RAID0, RAID1, RAID5, or RAID6. Different levels of arrays have different data protection functions and access speeds, and the way data is stored and accessed on the hard drives is also different. RAID array cards can form multiple arrays to facilitate different levels of protection for different data. The basic architecture is as follows: Figure 1 As shown, Figure 1 The RAID array card manages two arrays, one at RAID 6 level and one at RAID 0 level.
[0003] Currently, RAID array cards manage multiple arrays by simply determining the number of hard drives in an array when creating it, thereby locking in the maximum capacity of the array. However, in daily use, it's common for arrays to be created without properly estimating their capacity, resulting in a smaller number of hard drives being allocated. When the array capacity becomes insufficient to store data, it becomes necessary to back up the data at considerable expense and then reallocate the hard drives between arrays to ensure that each array has a reasonable number of hard drives. Summary of the Invention
[0004] (1) Technical issues to be resolved
[0005] The technical problem to be solved by the present invention is how to provide a RAID array card that automatically adjusts the number of array hard disks, so as to solve the problem that the current RAID array card is very costly in reallocating the number of hard disks between different arrays.
[0006] (2) Technical solution
[0007] In order to solve the above technical problems, the present invention proposes a RAID array card that automatically adjusts the number of array hard disks, the idle state monitor, capacity occupancy calculator, hard disk allocation calculator and data migrator,
[0008] The idle state monitor is used to detect the current operation status of the RAID array card when the RAID array card is powered on. If there is no data read or write task, a capacity calculation command is sent to the capacity occupancy calculator. If there is a data read or write task, the idle state monitor status is continued to be queried.
[0009] The capacity occupancy calculator is used to query the RAID array information currently managed by the RAID array card after receiving the capacity calculation command, and calculate the capacity occupancy ratio of all arrays; if the capacity occupancy ratio of all arrays is within the reasonable value, no operation is performed; if the capacity occupancy ratio of an array exceeds the reasonable value, the capacity occupancy calculator sends the capacity occupancy ratio of each array to the hard disk allocation calculator and sends a command to start the work;
[0010] The hard drive allocation calculator, upon receiving a start command, calculates hard drive allocation based on the capacity utilization ratio of each array, the RAID level of each array, and the capacity and number of hard drives in each array, attempting to adjust the number of hard drives in each array. If the hard drive allocation calculator obtains a new hard drive allocation plan, it feeds the new plan back to the host computer management software, which then displays the new plan and waits for the RAID array card operator to confirm whether to proceed. If the RAID array card operator approves the new plan, the host computer sends a command to the data migrator.
[0011] The data migrator is used to adjust the number of hard disks in the array after receiving commands from the host computer, and then starts to query the idle status monitor. If the idle status monitor shows that the RAID array card is working, the data migrator stops working; if the idle status monitor shows that the RAID array card is idle, the data migrator migrates the array data to the new array until all data migration is completed and the process ends.
[0012] Furthermore, the RAID array card is connected to the host computer via a PCIE interface and connected to the RAID array via a SATA interface, and the host computer runs RAID controller management software.
[0013] Furthermore, if the hard disk allocation calculator fails to calculate a new hard disk allocation plan, the capacity occupancy ratio of each array is sent to the host computer management software, and the host computer management software reminds the operator that the array capacity occupancy ratio exceeds a reasonable value.
[0014] Furthermore, if the RAID array card operator rejects the new allocation plan, the host computer interface will display the array's capacity occupancy rate to remind the operator to pay attention to the capacity.
[0015] Furthermore, when the RAID controller card is powered on, the idle state monitor starts counting when the host issues a new command. When the host does not issue a new command during the N-second countdown, the idle state monitor regards the current state as the idle state and sends a calculation capacity command to the capacity occupancy calculator. If the host sends a new command within N seconds, the idle state monitor restarts the N-second countdown.
[0016] Furthermore, N=3.
[0017] Furthermore, the capacity occupancy calculator calculates the capacity occupancy ratio of all arrays specifically including: reading array information stored in each array to obtain the current data occupancy, then calculating the maximum capacity of each array, and dividing the calculated data occupancy by the maximum capacity to obtain the capacity occupancy ratio of each array.
[0018] Furthermore, a reasonable value is 90%.
[0019] Furthermore, the hard disk allocation calculator performs hard disk allocation calculations specifically including: the hard disk allocation calculator selects the array with the lowest capacity occupancy rate to perform capacity occupancy analysis, performs array hard disk quantity reduction analysis for the RAID level of the array, and determines whether the number of hard disks in the array can still form an array of the same RAID level if one hard disk is reduced; if not, performs analysis and calculation for the next array; if so, calculates whether the capacity occupancy rate of the array is still below 90% when one hard disk is reduced; if above 90%, performs analysis and calculation for the next array; if still below 90%, the array can be used as a hard disk donation array; after obtaining the hard disk donation array, a new hard disk allocation plan for the hard disk donation array and the hard disk receiving array can be obtained, completing the calculation process of the hard disk allocation calculator.
[0020] Furthermore, the data migrator subtracts 1 from the number of hard disks in the hard disk donating array and adds 1 to the number of hard disks in the hard disk receiving array; queries the idle status monitor. If the idle status monitor indicates that the RAID controller card is working, the data migrator stops working and rechecks the status of the idle status monitor; if the idle status monitor indicates that the RAID controller card is idle, the data migrator migrates the data in the hard disk donating array, reads the original data from the hard disk donating array with the original number of hard disks, and then writes the data to the hard disk donating array with the number of hard disks subtracted by 1; after the data migration of the hard disk donating array is completed, the data migration work of the hard disk receiving array is started again; the data of the original hard disk receiving array is read and then written to the hard disk receiving array with the number of hard disks plus 1; and the process ends when all data migration is completed.
[0021] (3) Beneficial effects
[0022] The present invention provides a RAID array card that automatically adjusts the number of hard disks in an array. The present invention adds an idle status monitor, a capacity occupancy calculator, an array hard disk allocation calculator, and a data migrator, and transmits the automatic adjustment results to RAID controller management software for display. This realizes a function that can automatically adjust the number of hard disks in multiple arrays on the RAID array card, avoids the manual data saving and array readjustment operations caused by excessive array data storage on traditional RAID array cards, and improves the ease of use of the RAID array card. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is the basic architecture of RAID array card in the existing technology;
[0024] Figure 2 This is a schematic diagram of a RAID array card that automatically adjusts the number of array hard disks of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below with reference to the accompanying drawings and examples.
[0026] RAID (Redundant Array of Independent Disks) technology, also known as redundant array of independent hard drives, was originally designed to replace expensive, large-capacity hard drives by combining multiple hard drives. This technology also ensures that data integrity is preserved even if a single drive fails, thus ensuring data security. Through continuous development, RAID technology has become a comprehensive storage solution, increasing both capacity and speed, making data more secure and easier to manage. Precisely because of its high data reliability and fault tolerance, RAID technology is widely used in military storage systems.
[0027] The present invention proposes a RAID array card that automatically adjusts the number of hard disks in the array. The card can automatically adjust the number of hard disks in the RAID array by observing the space occupancy rate of data in the RAID array, thereby solving the above problem.
[0028] The RAID array card of the present invention, which automatically adjusts the number of array hard disks, includes: an idle state monitor, a capacity occupancy calculator, a hard disk allocation calculator, and a data migrator, and transmits the automatic adjustment results to the RAID controller management software of the host computer for display. The RAID array card is connected to the host computer through the PCIE interface and connected to the RAID array through the SATA interface. The architecture of the present invention is as follows Figure 2 As shown,
[0029] The idle state monitor is used to detect the current operation status of the RAID array card when the RAID array card is powered on. If there is no data read or write task, a capacity calculation command is sent to the capacity occupancy calculator. If there is a data read or write task, the idle state monitor status is continued to be queried.
[0030] The capacity occupancy calculator is used to query the RAID array information currently managed by the RAID array card after receiving the capacity calculation command, and calculate the capacity occupancy ratio of all arrays; if the capacity occupancy ratio of all arrays is within the reasonable value, no operation is performed; if the capacity occupancy ratio of an array exceeds the reasonable value, the capacity occupancy calculator sends the capacity occupancy ratio of each array to the hard disk allocation calculator and sends a command to start the work;
[0031] The hard disk allocation calculator is used to perform hard disk allocation calculations based on the capacity occupancy ratio of each array, the RAID level of each array, and the capacity and number of hard disks contained in each array after receiving the start work command, and try to adjust the number of hard disks contained in each array; if the hard disk allocation calculator fails to calculate a new hard disk allocation plan, it sends the capacity occupancy ratio of each array to the host computer management software, and the host computer management software reminds the operator that the array capacity occupancy ratio exceeds the reasonable value; if the hard disk allocation calculator obtains a new hard disk allocation plan, it feeds back the new allocation plan to the host computer management software; the host computer management software displays the new allocation plan and waits for the RAID array card operator to determine whether to implement the new allocation plan; if the RAID array card operator rejects the new allocation plan, the host computer interface displays the array capacity occupancy rate to remind the operator to pay attention to the capacity; if the RAID array card operator approves the new allocation plan, the host computer sends a command to the data migrator;
[0032] The data migrator is used to adjust the number of hard disks in the array after receiving commands from the host computer, and then starts to query the idle status monitor. If the idle status monitor shows that the RAID array card is working, the data migrator stops working; if the idle status monitor shows that the RAID array card is idle, the data migrator migrates the array data to the new array until all data migration is completed and the process ends.
[0033] Example 1:
[0034] (1) When the RAID array card is powered on, the idle state monitor starts counting when the host sends a new command. When the host does not send a new command during the 3-second countdown, the idle state monitor regards the current state as the idle state and sends a calculation capacity command to the capacity occupancy calculator. If the host sends a new command within 3 seconds, the idle state monitor restarts the 3-second countdown.
[0035] (2) After receiving the capacity calculation command, the capacity occupancy calculator starts to query the RAID array information currently managed by the RAID array card, obtains the current data occupancy by reading the array information stored in each array, and then calculates the maximum capacity of each array. By dividing the calculated data occupancy by the maximum capacity, the capacity occupancy ratio of each array is obtained;
[0036] (3) If the capacity occupancy ratio of all arrays is within 90%, no operation is performed;
[0037] (4) If the capacity occupancy ratio of an array exceeds 90%, the capacity occupancy calculator sends the capacity occupancy ratio of each array to the hard disk allocation calculator and sends a command to start working;
[0038] (5) After receiving the start-up command, the hard disk allocation calculator selects the array with the lowest capacity occupancy rate to perform capacity occupancy rate analysis: a. Analyze the reduction of the number of hard disks in the array for the RAID level of this array. If one hard disk is reduced, can the number of hard disks in this array still form an array of this RAID level? b. If not, perform analysis and calculation for the next array. c. If so, calculate whether the capacity occupancy rate of this array is still below 90% when one hard disk is reduced. d. If it is above 90%, perform analysis and calculation for the next array. e. If it is still below 90%, this array can be used as a hard disk donation array. f. After obtaining the hard disk donation array, a new hard disk allocation plan for the hard disk donation array and the hard disk receiving array can be obtained, completing the calculation process of the hard disk allocation calculator.
[0039] (6) If the hard disk allocation calculator fails to calculate a new hard disk allocation plan, the capacity occupancy ratio of each array is sent to the host computer management software;
[0040] (7) The upper computer management software will remind the RAID array card operator through a pop-up window on the display interface that the array capacity occupancy rate exceeds 90%, and will also display the capacity occupancy rate of each array;
[0041] (8) If the hard disk allocation calculator obtains a new hard disk allocation plan, the new allocation plan is fed back to the host computer management software;
[0042] (9) The upper computer management software displays the new hard disk quantity allocation plan in a pop-up window on the display interface, waiting for the RAID array card operator to confirm whether to proceed with the new allocation plan;
[0043] (10) If the RAID array card operator rejects the new allocation plan, the host computer interface will display the array capacity occupancy rate to remind the operator to pay attention to the capacity;
[0044] (11) If the RAID array card operator approves the new allocation plan, the host computer sends a command to the data migrator. After receiving the command, the data migrator: a. subtracts 1 from the number of hard disks in the hard disk donation array and adds 1 to the number of hard disks in the hard disk receiving array; b. queries the idle status monitor. If the idle status monitor shows that the RAID array card is working, the data migrator stops working and re-checks the status of the idle status monitor; c. If the idle status monitor shows that the RAID array card is idle, the data migrator migrates the data of the hard disk donation array, reads the original data from the hard disk donation array with the original number of hard disks, and then writes it into the hard disk donation array with the number of hard disks subtracted by 1; d. After the data migration of the hard disk donation array is completed, the data migration of the hard disk receiving array will begin; e. reads the data from the original hard disk receiving array and then writes it into the hard disk receiving array with the number of hard disks plus 1; d. The process ends until all data is migrated.
[0045] The present invention adds an idle status monitor, a capacity occupancy calculator, an array hard disk allocation calculator, and a data migrator, and transmits the automatic adjustment results to the RAID controller management software for display. This realizes a function that can automatically adjust the number of hard disks in multiple arrays on a RAID array card, avoids the manual data saving and array readjustment operations caused by excessive array data storage on traditional RAID array cards, and improves the convenience of using the RAID array card.
[0046] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A RAID array card with automatic adjustment of the number of array hard disks, characterized in that: The RAID array card includes: an idle state monitor, a capacity occupancy calculator, a hard disk allocation calculator and a data migrator, wherein: The idle state monitor is used to detect the current operation status of the RAID array card when the RAID array card is powered on. If there is no data read or write task, a capacity calculation command is sent to the capacity occupancy calculator. If there is a data read or write task, the idle state monitor status is continued to be queried. The capacity occupancy calculator is used to query the RAID array information currently managed by the RAID array card after receiving the capacity calculation command, and calculate the capacity occupancy ratio of all arrays; if the capacity occupancy ratio of all arrays is within the reasonable value, no operation is performed; if the capacity occupancy ratio of an array exceeds the reasonable value, the capacity occupancy calculator sends the capacity occupancy ratio of each array to the hard disk allocation calculator and sends a command to start the work; The hard drive allocation calculator, upon receiving a start command, calculates hard drive allocation based on the capacity utilization ratio of each array, the RAID level of each array, and the capacity and number of hard drives in each array, attempting to adjust the number of hard drives in each array. If the hard drive allocation calculator obtains a new hard drive allocation plan, it feeds the new plan back to the host computer management software, which then displays the new plan and waits for the RAID array card operator to confirm whether to proceed. If the RAID array card operator approves the new plan, the host computer sends a command to the data migrator. The data migrator is used to adjust the number of hard disks in the array after receiving a command from the host computer, and then starts to query the idle status monitor. If the idle status monitor shows that the RAID array card is working, the data migrator stops working. If the idle status monitor shows that the RAID array card is idle, the data migrator migrates the array data to the new array until all data migration is completed and the process ends. in, The hard disk allocation calculator performs hard disk allocation calculations specifically including: selecting the array with the lowest capacity utilization rate for capacity utilization analysis, analyzing the number of array hard disks reduced for the RAID level of this array, and determining whether the number of hard disks in this array can still form an array of this RAID level if one hard disk is reduced; if not, performing analysis and calculation for the next array; if so, calculating whether the capacity utilization rate of this array is still below 90% with one hard disk reduced; if above 90%, performing analysis and calculation for the next array; if still below 90%, this array can be used as a hard disk donation array; after obtaining the hard disk donation array, a new hard disk allocation plan for the hard disk donation array and the hard disk receiving array can be obtained, completing the hard disk allocation calculator calculation process.
2. The RAID array card with automatic adjustment of the number of array hard disks according to claim 1, characterized in that: The RAID array card is connected to the host computer through the PCIE interface and connected to the RAID array through the SATA interface. The host computer runs the RAID controller management software.
3. The RAID array card with automatic adjustment of the number of array hard disks according to claim 2, characterized in that: If the hard disk allocation calculator fails to calculate a new hard disk allocation plan, the capacity occupancy ratio of each array is sent to the host computer management software, and the host computer management software reminds the operator that the array capacity occupancy ratio exceeds a reasonable value.
4. The RAID array card with automatic adjustment of the number of array hard disks according to claim 2, wherein: If the RAID array card operator rejects the new allocation plan, the host computer interface will display the array capacity occupancy rate to remind personnel to pay attention to the capacity.
5. The RAID array card with automatic adjustment of the number of array hard disks according to any one of claims 1 to 4, characterized in that: When the RAID controller card is powered on, the idle state monitor starts counting when the host issues a new command. If the host does not issue a new command within N seconds, the idle state monitor considers the current state to be idle and sends a calculate capacity command to the capacity occupancy calculator. If the host issues a new command within N seconds, the idle state monitor restarts the N-second countdown.
6. The RAID array card with automatic adjustment of the number of array hard disks according to claim 5, characterized in that: N=3。 7. The RAID array card with automatic adjustment of the number of array hard disks according to claim 5, characterized in that: The capacity occupancy calculator calculates the capacity occupancy ratio of all arrays, specifically including: reading the array information stored in each array to obtain the current data occupancy, then calculating the maximum capacity of each array, and dividing the calculated data occupancy by the maximum capacity to obtain the capacity occupancy ratio of each array.
8. The RAID array card with automatic adjustment of the number of array hard disks according to claim 7, characterized in that: A reasonable value is 90%.
9. The RAID array card with automatic adjustment of the number of array hard disks according to claim 7, characterized in that: The data migrator decrements the number of hard disks in the donating array by 1 and increases the number of hard disks in the receiving array by 1. The data migrator queries the idle status monitor. If the idle status monitor indicates that the RAID controller card is working, the data migrator stops working and rechecks the idle status monitor. If the idle status monitor indicates that the RAID controller card is idle, the data migrator migrates the data in the donating array by reading the original data from the donating array with the original number of hard disks and then writing it to the donating array with the number of hard disks reduced by 1. After the data migration of the donating array is completed, the data migration of the receiving array is started again. The data is read from the original receiving array and then written to the receiving array with the number of hard disks increased by 1. The process ends when all data migration is completed.
Citation Information
Patent Citations
A method and a system for allocating namespace in a solid state disk, an apparatus and a storage medium
CN109002258A
RAID (Redundant Array of Independent Disks) control card architecture for S.M.A.R.T. Information automatic early warning
CN113900593A