Data protection method in disk array expansion state, terminal and storage medium

By calculating the overlap area and reserving a backup area, the data in the overlap area is backed up before expansion, which solves the problem of old data being overwritten and lost during disk array expansion, achieving data security and stability, while reducing hardware complexity and cost.

CN119292525BActive Publication Date: 2025-11-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411344492.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-11-25
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

Existing technologies, especially in the initial stages of disk array expansion, are prone to causing the loss of old data due to overwriting, and hardware-based data protection solutions increase the complexity and cost of hardware design.

Method used

By calculating the size of the overlapping area before and after disk array expansion, a backup area of ​​the corresponding size is reserved, and the data in the overlapping area is backed up to the backup area before expansion to ensure data security.

Benefits of technology

It ensures data security and stability during disk array expansion, reduces hardware complexity and cost, and improves expansion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292525B_ABST
    Figure CN119292525B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of storage, and particularly provides a data protection method in a disk array expansion state, a terminal and a storage medium, which comprises the following steps: calculating the size of an overlapping area of a disk based on expansion information of a disk array, the overlapping area being a data overlapping area before and after expansion; creating a backup area which is not smaller than the overlapping area on the disk; and backing up original data of the overlapping area to the backup area before expansion is performed. The application guarantees the data safety and stability in the disk array expansion process at a minimum cost.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of storage, and particularly relates to a data protection method in a disk array expansion state, a terminal and a storage medium. BACKGROUND

[0002] From the perspective of data protection, the disk array expansion process is generally divided into a starting stage and a proceeding stage. The characteristic of the starting stage is that the "deformation zones" of the data before and after expansion overlap in the physical space of the hard disk, which leads to the fact that the newly generated data after expansion will cover the old data before expansion in the overlapping area. If expansion occurs abnormally at this time, the old data will be lost and cannot be recovered, so special operations are needed to achieve data protection in the starting stage of expansion. For the proceeding stage, since the RAID array expansion is disk expansion, the new and old deformation zones will "gradually move away", and when the two deformation zones do not overlap, the proceeding stage of expansion is entered. The characteristic of the proceeding stage is that the "deformation zones" before and after expansion do not overlap in the physical space of the hard disk, and the newly generated data during expansion will not cover the old data, so that abnormal expansion will not cause data loss and no special treatment is needed.

[0003] At present, in order to avoid data loss during RAID array expansion, a hardware method (for example, using a super capacitor) is generally used to save data to non-volatile memory through hardware logic when an abnormality occurs. This implementation will cause the complexity of hardware logic design to increase, the product cost to increase, and the system logic to be complex. SUMMARY

[0004] In view of the above problems of the prior art, the present application provides a data protection method in a disk array expansion state, a terminal and a storage medium to solve the above technical problems.

[0005] In a first aspect, the present application provides a data protection method in a disk array expansion state, comprising:

[0006] calculating the size of the overlapping zone of the disk based on the expansion information of the disk array, the overlapping zone being the data overlap zone before and after expansion;

[0007] creating a backup zone on the disk which is not smaller than the overlapping zone;

[0008] before executing expansion, backing up the original data of the overlapping zone to the backup zone.

[0009] By calculating the size of the overlapping zone, a backup zone of a corresponding size is reserved, and by backing up the data in the overlapping zone of the disk, the safety of the data in the overlapping zone is ensured.

[0010] In an optional embodiment, calculating the size of the overlapping zone of the disk based on the expansion information of the disk array comprises:

[0011] Obtaining expansion information of the disk array, the expansion information including a number of data disks before expansion and a number of data disks after expansion;

[0012] Setting the number of data disks before expansion as a number of deformation zone strips after expansion, and setting the number of data disks after expansion as a number of deformation zone strips before expansion;

[0013] Setting a product of the number of deformation zone strips after expansion and the number of deformation zone strips before expansion as a number of overlapping zone strips.

[0014] The method can accurately calculate the size of the overlapping zone, ensure that the calculated overlapping zone covers all actual overlapping areas, avoid area omission, and ensure data security.

[0015] In an optional embodiment, a backup zone not smaller than the overlapping zone is created for a disk, including:

[0016] Obtaining basic information of a disk array to be created, the basic information including a number of disks of the disk array;

[0017] Obtaining historical expansion information from a database based on the basic information, the historical expansion information including numbers of disks before and after expansion of the disk array;

[0018] Extracting a maximum number of disks after expansion from corresponding historical expansion information, and calculating a maximum backup zone based on the maximum number of disks after expansion;

[0019] Reserving a backup zone of a corresponding size when creating the disk array based on the maximum backup zone.

[0020] The pre-constructed backup zone is adopted, and a step of constructing a backup zone is not required during expansion, thereby improving the efficiency of disk array expansion.

[0021] In an optional embodiment, a backup zone not smaller than the overlapping zone is created for a disk, including:

[0022] Positioning a corresponding number of strips closest to the front as a disk overlapping zone based on a number of strips corresponding to the disk overlapping zone, and obtaining an effective data amount of original data of the disk overlapping zone;

[0023] Calculating required storage resources based on the effective data amount;

[0024] Dividing a backup zone of a corresponding size in the disk based on the required storage resources.

[0025] The backup zone is constructed in this way, and a backup zone of a corresponding size can be created according to backup requirements, thereby reducing the storage resource occupancy rate of the backup zone.

[0026] In an optional embodiment, the method further includes:

[0027] Confirming that the original data backup of the overlap area is completed, performing capacity expansion;

[0028] Obtaining the capacity expansion progress;

[0029] Confirming that the capacity expansion of the overlap area is completed based on the capacity expansion progress, clearing the backup data and releasing the backup area.

[0030] In an optional embodiment, obtaining the capacity expansion progress comprises:

[0031] Using the progress viewing instruction of the disk array card to obtain the state of the disk array and the capacity expansion progress.

[0032] In an optional embodiment, confirming that the capacity expansion of the overlap area is completed based on the capacity expansion progress comprises:

[0033] Setting a target proportion of the overlap area based on the proportion of the overlap area in the total storage space of the disk;

[0034] Obtaining the progress percentage of the disk from the capacity expansion progress, judging whether the progress percentage reaches the target proportion, and confirming that the capacity expansion of the disk is completed if the progress percentage reaches the target proportion.

[0035] In an optional embodiment, the method further comprises:

[0036] If the capacity expansion progress is stagnant, confirming the location of the target deformed area where an exception exists;

[0037] If the target deformed area is in the overlap area, recovering the data of the target deformed area based on the corresponding backup data of the backup area;

[0038] If the target deformed area is not in the overlap area, not performing data recovery.

[0039] In a second aspect, the application provides a data protection system in a disk array capacity expansion state, comprising:

[0040] An overlap calculation module for calculating the size of the overlap area of the disk based on the capacity expansion information of the disk array, the overlap area being the data overlap area before and after capacity expansion;

[0041] A backup setting module for creating a backup area no smaller than the overlap area on the disk;

[0042] A backup execution module for backing up the original data of the overlap area to the backup area before performing capacity expansion.

[0043] In a third aspect, a terminal is provided, comprising:

[0044] A processor and a memory, wherein,

[0045] The memory is used for storing a computer program,

[0046] The processor is configured to call and run the computer program from the memory, so that the terminal executes the method of the terminal.

[0047] In a fourth aspect, a computer storage medium is provided, and the computer readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the method of the above aspects.

[0048] The data protection method, terminal and storage medium provided by the application have the beneficial effects that the application provides a data protection method in the disk array expansion state, a terminal and a storage medium, a backup area of a corresponding size is constructed for an overlapping area, and the data of the overlapping area is backed up by using the backup area before expansion is performed, so that the data security and stability of the disk array expansion process are ensured at a minimum cost.

[0049] In addition, the application has reliable design principles, a simple structure and very wide application prospects. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

[0051] Figure 1 is a schematic flowchart of the method of an embodiment of the application.

[0052] Figure 2 is a schematic flowchart of the expansion process of the method of an embodiment of the application.

[0053] Figure 3 is a schematic diagram of the backup area of the method of an embodiment of the application.

[0054] Figure 4 is a schematic diagram of the overlapping area of the method of an embodiment of the application.

[0055] Figure 5 is a schematic diagram of the deformation area of the method of an embodiment of the application.

[0056] Figure 6 is a schematic diagram of the deformation expansion of the overlapping area of the method of an embodiment of the application.

[0057] Figure 7 is a schematic diagram of the deformation expansion of the non-overlapping area of the method of an embodiment of the application.

[0058] Figure 8 is a schematic flowchart of the expansion exception handling of the method of an embodiment of the application.

[0059] Figure 9 is a schematic block diagram of a system according to an embodiment of the present application.

[0060] Figure 10 is a schematic block diagram of a terminal according to an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the personnel in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should belong to the protection scope of the present application.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application.

[0063] The key terms appearing in the present application will be explained below.

[0064] RAID: Redundant Array of Independent Disks, an array with redundancy composed of many independent disks, which are combined into a huge disk array to improve the performance of the entire disk system by using the data provided by individual disks. Using this technology, data is cut into many sections and stored on each hard disk.

[0065] Chunk: refers to a data block written to a physical disk at a time.

[0066] Stripe: also known as striping, is a collection of position-related chunks on different partitions of the array, and is a unit for organizing chunks on different partitions.

[0067] Stripe width: the number of chunks that can be written in parallel, which is equal to the number of disks in the disk array, excluding the check disk.

[0068] Stripe size: the size of the entire stripe, Stripe size = Chunk size * Stripewidth.

[0069] Deformation zone: a number of continuous stripes being expanded (the RAID array is expanded in the deformation zone as the granularity).

[0070] The data protection method in the disk array expansion state provided by the embodiment of the application is executed by a computer device, and accordingly, the data protection system in the disk array expansion state runs in the computer device.

[0071] Figure 1 is a schematic flowchart of the method of an embodiment of the application. In the flowchart, Figure 1 The execution subject can be a data protection system in a disk array expansion state. The order of the steps in the flowchart can be changed, and some steps can be omitted according to different requirements.

[0072] As Figure 1 indicated, the method comprises the following steps.

[0073] Step 110: calculating the size of the overlapping area of the disks based on the expansion information of the disk array, the overlapping area being the overlapping area of the data before and after expansion;

[0074] Sub-step 111: first, the configurations of the disk array before and after expansion are determined, including the number of disks, the capacity, the RAID level and other key information.

[0075] Sub-step 112: according to the configuration difference before and after expansion, it is identified which disks or data blocks will directly participate in the expansion process, and it is determined which part of these areas belongs to the overlapping area, i.e., the overlapping area, in the new and old configurations.

[0076] Sub-step 113: the total size of the overlapping area is accurately calculated by using the disk array management software or professional tools, and the space requirement of the check data or parity bit is additionally calculated considering the data redundancy characteristics of the RAID level.

[0077] Sub-step 114: the specific position, size and involved disk number of the overlapping area are recorded, which prepares for subsequent operations.

[0078] Step 120: creating a backup area on the disk which is not less than the overlapping area;

[0079] Sub-step 121: evaluating the available space of the existing disk array to ensure that there is enough space to create the backup area. If the space is insufficient, it can be considered to add new disks or optimize the existing storage layout.

[0080] Sub-step 122: according to the size of the overlapping area, sufficient space is planned and allocated in the disk array as the backup area. The size of the backup area should be not less than the total size of the overlapping area, and a certain redundancy space is considered to deal with unexpected situations.

[0081] Sub-step 123: using the disk array management software to configure the backup area to ensure that its performance is equivalent to that of the overlapping area, so as to ensure the efficiency of data backup and recovery.

[0082] Sub-step 124: Verify whether the creation of the backup zone is successful and confirm its status as available.

[0083] Step 130, before performing the expansion, backup the original data of the overlap zone to the backup zone.

[0084] Sub-step 131: Start the data backup process within the planned maintenance window. Ensure that the system load is low at this time to reduce the impact on business.

[0085] Sub-step 132: Use efficient data migration tools or scripts to copy all data (including user data and system metadata) in the overlap zone to the previously created backup zone.

[0086] Sub-step 133: Implement strict data verification mechanisms during data migration to ensure the integrity and accuracy of backup data.

[0087] Sub-step 134: After completing data migration, perform final data consistency checks to confirm that the data in the backup zone is completely consistent with the original data of the overlap zone.

[0088] Sub-step 135: Record detailed information of the backup operation, including time, data volume, operator, etc., to provide basis for subsequent data recovery or audit.

[0089] In order to facilitate the understanding of the present application, the principle of the data protection method of the present application in the state of disk array expansion is described further below in combination with the process of managing the data protection in the state of disk array expansion in the embodiment.

[0090] Specifically, please refer to Figure 2 The data protection method in the state of disk array expansion comprises:

[0091] S1, creating a backup zone.

[0092] Obtain the basic information of the current disk array to be created, including the number of disks of the disk array; based on the basic information, obtain historical expansion information from the database, including the number of disks before and after the expansion of the disk array; extract the maximum number of disks after expansion from the corresponding historical expansion information, calculate the maximum backup zone based on the maximum number of disks after expansion; based on the maximum backup zone, reserve a backup zone of corresponding size when creating the disk array.

[0093] Specifically, the following steps are included:

[0094] Determine the project or task requirements and clearly define the specific specifications and purposes of the disk array to be created.

[0095] Collect the basic information of the current disk array to be created through configuration files, user input, or system interfaces, including but not limited to: planned deployment of disk array model, expected initial disk quantity, RAID level, etc.

[0096] Establish a connection with the database that stores historical expansion information, ensuring access to relevant data tables.

[0097] Construct query conditions based on the basic information of the current disk array to be created (such as model, initial disk quantity, etc.) to retrieve similar historical expansion records from the database.

[0098] Perform a query operation to retrieve all historical expansion information that meets the conditions from the database. This information should include the number of disks before and after expansion, expansion time, operation results, etc.

[0099] Iterate through the retrieved historical expansion information and extract the number of disks after expansion from each record.

[0100] Compare all extracted numbers of disks after expansion to find the maximum value, which is the maximum number of disks after expansion based on historical experience.

[0101] Based on the maximum number of disks after expansion, calculate the maximum data backup area size that may be needed after maximum expansion, considering the RAID level and data redundancy requirements of the current disk array.

[0102] Consider the redundancy and scalability of the backup area, and may need to adjust the calculated maximum backup area size or add a certain buffer space.

[0103] In the initial configuration phase of the disk array, reserve an area of the corresponding size as the backup area in the physical or logical space of the disk array based on the maximum backup area size calculated in step four.

[0104] Configure the relevant parameters of the backup area, such as RAID level, access permissions, etc., to ensure the security and reliability of the backup area.

[0105] Verify whether the creation and configuration of the backup area are successful, ensuring that the backup area is ready before the disk array is put into use, and can receive backup data from the overlap area at any time.

[0106] For example, create a 4-disk RAID 5 with chunk=16K. When creating the RAID, reserve the expansion backup area according to the extreme value of the expansion backup area, with each disk reserving 256M of expansion backup area. The backup area is shown as follows. Figure 3

[0107] S2, obtain expansion information. ​

[0108] For example, the number of deformation zone strips before and after expansion is determined, the number of deformation zone strips before expansion is 4, and the number of deformation zone strips after expansion is 3.

[0109] S3, the size of the overlapping area is calculated.

[0110] The expansion information of the disk array is obtained, the expansion information including the number of data disks before expansion and the number of data disks after expansion; the number of data disks before expansion is set as the number of deformation zone strips after expansion, and the number of data disks after expansion is set as the number of deformation zone strips before expansion; the product of the number of deformation zone strips after expansion and the number of deformation zone strips before expansion is set as the number of overlapping zone strips.

[0111] The method can accurately calculate the size of the overlapping area, ensure that the calculated overlapping area covers all the actual overlapping areas, avoid area omission, and ensure data security.

[0112] The overlapping area is shown in Figure 4 The "deformation zone" of the strips before and after expansion overlaps in the physical space of the hard disk. The newly generated data after expansion in the overlapping area will cover the original old data before expansion. If expansion occurs abnormally at this time, the old data will be lost and cannot be recovered.

[0113] According to the expansion information of the RAID array, the method for determining the size of the overlapping area comprises:

[0114] From the expansion information, the number of data disks before expansion: disk_num_x, and the number of data disks after expansion: disk_num_y are extracted;

[0115] Set the number of overlapping zone strips before expansion: stripe_num_x, and the number of overlapping zone strips after expansion: stripe_num_y;

[0116] Set the number of deformation zone strips before and after expansion:

[0117] transform_stripe_num_x =disk_num_y;

[0118] transform_stripe_num_y =disk_num_x;

[0119] Determine the number of overlapping zone strips:

[0120] stripe_num_x=transform_stripe_num_y*transform_stripe_num_x=disk_num_x*disk_num_y;

[0121] The number of overlapping zone strips meets this condition, and the deformation zone after the overlapping zone will not overlap.

[0122] For example:

[0123] RAID 54 disk expansion to 7 disks, transform_stripe_num_x = 3, transform_stripe_num_y = 6, stripe_num_x = 3 * 6 = 18 (RAID 5 contains 1 check disk);

[0124] RAID 65 disk expansion to 9 disks, transform_stripe_num_x = 3, transform_stripe_num_y = 7, stripe_num_x = 3 * 7 = 21 (RAID 6 contains 2 check disks);

[0125] When the RAID array is expanded, the number of overlapping zones meets the above conditions. After the RAID array expansion is completed, the front and rear deformation zones will never intersect during the expansion process.

[0126] The method for proving that the deformation zone after expansion is below the deformation zone before expansion and does not intersect includes:

[0127] The stripe width before expansion:

[0128] stripe_width_x = disk_num_x * chunk;

[0129] The stripe width after expansion:

[0130] stripe_width_y = disk_num_y * chunk;

[0131] The number of chunks in the overlapping zone before expansion:

[0132] chunk_num_x = stripe_num_x * stripe_width_x;

[0133] = disk_num_y * chunk * stripe_num_y;

[0134] stripe_num_y = disk_num * disk_num;

[0135] The stripe_id_x of the next stripe of the RAID overlapping zone before expansion is stripe_num_y + 1;

[0136] The stripe_id_y of the last stripe of the next deformation zone of the RAID overlapping zone after expansion is stripe_num_y + transform_stripe_num_y;

[0137] Please refer to Figure 5 Because the stripe of old and new is more and more far away, as long as the next deformation zone of the overlap area is not intersected, the subsequent stripe will never intersect.

[0138] It can be proved that: stripe_id_y> stripe_id_x;

[0139] Get disk_num_x* (disk_num_y-disk_num_x+1) +1>0;

[0140] The above inequality holds.

[0141] It is proved that the number of stripes in the overlap area before expansion meets stripe_num_x=disk_num_x*disk_num_y, and the number of stripes in the deformation area before expansion meets transform_stripe_num_x=disk_num_y. When the RAID array is expanded, the stripe after the overlap area will not cover the old data, so only the old data of the overlap area needs to be saved, which can ensure the safety of the user's data during the expansion of the RAID array.

[0142] For example, determine the size of the overlap area, the number of data disks before expansion is 3, and the number of data disks after expansion is 4. The number of stripes in the overlap area before expansion is 12.

[0143] S4, start expansion.

[0144] (1) Confirm that the backup of the original data of the overlap area is completed, and execute expansion;

[0145] (2) Get the expansion progress;

[0146] The state of the disk array and the expansion progress are obtained by using the progress viewing instruction of the disk array card. Specifically, the following steps are included:

[0147] Enter the ADVANCE management interface, select the corresponding RAID card, and then enter the main menu→virtual driver manager interface.

[0148] In the virtual driver manager interface, select the VD (for example, V239, RAID5) that is being expanded.

[0149] Select the reconfigure virtual Drives option in operation, and then click GO.

[0150] In the following interface, select ADD DRIVES, change the hard disk state to enable, and apply the changes.

[0151] Confirm the changes, select start Operation.

[0152] Switch back to the virtual driver manager interface, you can view the rebuild status, which will be reflected in the expansion progress.

[0153] Use commands such as Storcli64 / c0 / v239 show to view the status of the RAID array, which will display the percentage of the rebuild, so as to understand the expansion progress.

[0154] (3) Confirm the completion of the expansion of the overlap area based on the expansion progress, delete the backup data and release the backup area.

[0155] Set the target proportion of the overlap area based on the proportion of the overlap area in the total storage space of the disk; obtain the progress percentage of the disk from the expansion progress, and determine whether the progress percentage reaches the target proportion. If the progress percentage reaches the target proportion, it is confirmed that the expansion of the overlap area of the disk is completed.

[0156] Specifically, the following steps are included:

[0157] 1. Define the target proportion of the overlap area and the strategy

[0158] Calculate the target proportion: first, according to the total storage space of the disk, the current size of the overlap area and the expected application demand, calculate the target proportion of the overlap area through the algorithm. This proportion can be a fixed value, or it can be dynamically adjusted according to the disk usage and performance demand.

[0159] Set the expansion strategy: determine the trigger condition of the expansion (such as the disk usage reaching a certain threshold), the priority of the expansion (whether it is prior to other disk operations), and the step or increment size of the expansion.

[0160] 2. Monitor and detect the expansion progress

[0161] Real-time monitoring: use system monitoring tools or custom scripts to obtain the current state of the disk in real time, including the used space, the remaining space and the current size of the overlap area.

[0162] Progress calculation: according to the current size of the overlap area and the expansion target, calculate the progress percentage of the expansion. The progress percentage can be obtained by comparing the ratio of the current overlap area size and the target size.

[0163] The expansion of the overlap area is shown in Figure 6 After the expansion of the overlap area is completed, the original backup data can be deleted.

[0164] Then normally execute the expansion of the non-overlap area, as shown in Figure 7The non-overlapping area is expanded without backup until the expansion of the entire RAID array is completed.

[0165] S5, abnormality processing.

[0166] If the expansion progress stagnates, the location of the target deformation area where the abnormality is confirmed exists; if the target deformation area is in the overlapping area, the data of the target deformation area is recovered based on the corresponding backup data of the backup area; if the target deformation area is not in the overlapping area, no data recovery is performed.

[0167] Specifically, refer to Figure 8 , comprising the following steps:

[0168] After power-on, the software obtains the expansion progress.

[0169] Through the expansion progress, the number of the deformation area where the last expansion appears abnormal is obtained.

[0170] If the deformation area is in the overlapping area, the data of the deformation area in the RAID array is unreliable, the corresponding backup data is found in the expansion backup, and the user data is successfully recovered.

[0171] If the deformation area is outside the overlapping area, the data of the deformation area in the RAID array is reliable and does not need to be recovered.

[0172] In another embodiment of the present application, comprising the following steps:

[0173] S1, calculating the size of the overlapping area of the disk based on the expansion information of the disk array, the overlapping area being the data overlap area before and after expansion.

[0174] Obtaining the expansion information of the disk array, the expansion information including the number of data disks before expansion, the number of data disks after expansion; setting the number of data disks before expansion as the number of deformation area stripes after expansion, setting the number of data disks after expansion as the number of deformation area stripes before expansion; setting the product of the number of deformation area stripes after expansion and the number of deformation area stripes before expansion as the number of overlapping area stripes.

[0175] Specifically, comprising the following steps:

[0176] Collecting expansion information: first, obtaining detailed expansion information from the disk array management system, which includes but is not limited to the number of data disks before expansion (N_before), the number of data disks after expansion (N_after), the capacity of each data disk, the RAID level, etc.

[0177] Understanding the concept of overlapping area: the overlapping area refers to the part of the data that overlaps before and after expansion due to data migration and reorganization during the expansion process. This part of data needs to be specially processed to ensure data consistency and integrity.

[0178] Calculate the number of stripes in the overlap area: Here, the "number of stripes in the overlap area" is directly using the number of data disks as an indicator of striping.

[0179] Error handling: Check the validity of N_before and N_after, ensuring they are both positive integers and N_after > N_before.

[0180] According to the calculation result, determine the size of the overlap area (in terms of number of stripes or actual storage capacity).

[0181] S2, create a backup area on the disk that is not less than the overlap area.

[0182] Based on the number of stripes corresponding to the disk overlap area, locate the corresponding number of the most front stripes as the disk overlap area, obtain the effective data amount of the original data of the disk overlap area; calculate the required storage resources based on the effective data amount; based on the required storage resources, divide a backup area of corresponding size on the disk.

[0183] Using this way to build a backup area can create a backup area of corresponding size according to the backup requirement, reducing the storage resource occupancy rate of the backup area.

[0184] Specifically, the following steps are included:

[0185] Locate the overlap area: Based on the current layout of the disk and the expansion plan, accurately locate the position of the overlap area in the disk array.

[0186] Evaluate the effective data amount: Scan the overlap area and evaluate the total amount of effective data (i.e. data that needs to be preserved) therein. This involves reading data, checking checksums, identifying deleted or invalid data blocks, etc.

[0187] Calculate the required storage resources: According to the size of the effective data amount, plus a certain amount of redundant space (for error recovery, future growth, etc.), calculate the minimum storage capacity required for the backup area.

[0188] Create a backup area: In the appropriate location of the disk array (usually in the reserved unused space or newly added disk), divide an area of sufficient size as a backup area. Ensure that the size of the backup area is not less than the calculated required storage resources.

[0189] Optimize storage efficiency: Consider using compression, deduplication, and other storage optimization techniques to reduce the actual space occupied by the backup area.

[0190] S3, before performing the expansion, backup the original data of the overlap area to the backup area.

[0191] Prepare for backup operation: Confirm that the backup area has been correctly created and is available, and prepare to perform the data backup operation.

[0192] Perform data migration: Migrate the valid data in the overlap region to the backup region. Suspend or restrict access to the overlap region to ensure data consistency and integrity.

[0193] Verify backup data: After the backup is complete, verify the integrity and accuracy of the backup data. This can be done by comparing checksums, performing recovery tests, etc.

[0194] Record backup information: Record detailed information about the backup operation, including backup time, backup location, backup data volume, etc., for future recovery or audit use.

[0195] Continue expansion operation: After confirming the success of the backup, continue to perform the expansion operation of the disk array. This may include adding new data disks, reconfiguring RAID levels, data rebalancing, etc.

[0196] In some embodiments, the data protection system in the disk array expansion state can include a plurality of functional modules composed of computer program segments. The computer programs of each program segment in the data protection system in the disk array expansion state can be stored in the memory of the computer device and executed by at least one processor to perform the functions of data protection in the disk array expansion state (see Figure 1 Description).

[0197] In this embodiment, the data protection system in the disk array expansion state can be divided into a plurality of functional modules according to the functions it performs, as shown in Figure 9 The functional modules of system 900 can include overlap calculation module 910, backup setting module 920, and backup execution module 930. The module referred to by the present application refers to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which is stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0198] Overlap calculation module, for calculating the size of the overlap region of the disk based on the expansion information of the disk array, the overlap region being the data overlap region before and after expansion;

[0199] Backup setting module, for creating a backup region on the disk that is not smaller than the overlap region;

[0200] Backup execution module, for backing up the original data of the overlap region to the backup region before performing expansion.

[0201] Optionally, as an embodiment of the present application, calculating the size of the overlap region of the disk based on the expansion information of the disk array comprises:

[0202] Obtaining expansion information of the disk array, the expansion information including a number of data disks before expansion and a number of data disks after expansion;

[0203] Setting the number of data disks before expansion as a number of deformation zone strips after expansion, and setting the number of data disks after expansion as a number of deformation zone strips before expansion;

[0204] Setting a product of the number of deformation zone strips after expansion and the number of deformation zone strips before expansion as a number of overlapping zone strips.

[0205] Optionally, as one embodiment of the present application, creating a backup zone not less than the overlapping zone of the disk includes:

[0206] Obtaining basic information of a disk array to be created, the basic information including a number of disks of the disk array;

[0207] Obtaining historical expansion information from a database based on the basic information, the historical expansion information including numbers of disks before and after expansion of the disk array;

[0208] Extracting a maximum number of disks after expansion from corresponding historical expansion information, and calculating a maximum backup zone based on the maximum number of disks after expansion;

[0209] Reserving a backup zone of a corresponding size when creating the disk array based on the maximum backup zone.

[0210] Optionally, as one embodiment of the present application, creating a backup zone not less than the overlapping zone of the disk includes:

[0211] Positioning a corresponding number of strips closest to the front as a disk overlapping zone based on a number of strips corresponding to the disk overlapping zone, and obtaining an effective data amount of original data of the disk overlapping zone;

[0212] Calculating required storage resources based on the effective data amount;

[0213] Dividing a backup zone of a corresponding size in the disk based on the required storage resources.

[0214] Optionally, as one embodiment of the present application, it further includes:

[0215] Confirming that backup of original data of the overlapping zone is completed, and performing expansion;

[0216] Obtaining an expansion progress;

[0217] Confirming that expansion of the overlapping zone is completed based on the expansion progress, clearing backup data and releasing the backup zone.

[0218] Optionally, as one embodiment of the present application, obtaining the expansion progress includes:

[0219] The progress viewing instruction of the disk array card is used to obtain the state and expansion progress of the disk array.

[0220] Optionally, according to an embodiment of the present application, the expansion completion of the overlap area is confirmed based on the expansion progress, comprising:

[0221] The target proportion of the overlap area is set based on the proportion of the overlap area in the total storage space of the disk.

[0222] The progress percentage of the disk is obtained from the expansion progress, and it is judged whether the progress percentage reaches the target proportion, and if the progress percentage reaches the target proportion, it is confirmed that the expansion of the overlap area of the disk is completed.

[0223] Optionally, according to an embodiment of the present application, the method further comprises:

[0224] If the expansion progress is stagnant, the target deformed area is located at a position where the expansion progress is confirmed to be abnormal.

[0225] If the target deformed area is in the overlap area, the data of the target deformed area is recovered based on the corresponding backup data of the backup area.

[0226] If the target deformed area is not in the overlap area, the data recovery is not performed.

[0227] Figure 10 A structure schematic diagram of a terminal 1000 is provided for an embodiment of the present application, and the terminal 1000 can be used to execute the data protection method in the disk array expansion state provided by the embodiment of the present application.

[0228] The terminal 1000 can include a processor 1010, a memory 1020 and a communication unit 1030. These components communicate through one or more buses, and those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the present application, which can be a bus structure or a star structure, and can include more or fewer components than shown in the figure, or combine certain components, or different component arrangements.

[0229] The memory 1020 can be used to store the execution instructions of the processor 1010, and the memory 1020 can be realized by any type of volatile or non-volatile storage terminal or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 1020 are executed by the processor 1010, the terminal 1000 can execute part or all of the steps in the following method embodiments.

[0230] The processor 1010 is a control center of the storage terminal, connects various parts of the entire electronic terminal by using various interfaces and lines, and executes various functions of the electronic terminal and / or processes data by running or executing software programs and / or modules stored in the memory 1020 and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, can be composed of a single packaged IC, or can be composed of a plurality of packaged ICs connected to each other. For example, the processor 1010 can only include a central processing unit (CPU). In the embodiments of the present application, the CPU can be a single operation core or can include a plurality of operation cores.

[0231] The communication unit 1030 is configured to establish a communication channel, so that the storage terminal can communicate with other terminals. The communication unit 1030 receives user data sent by other terminals or sends user data to other terminals.

[0232] The present application also provides a computer storage medium, wherein the computer storage medium can store a program, and the program can include some or all steps in the embodiments provided by the present application when executed. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0233] Therefore, the present application constructs a backup area of a corresponding size for the overlapping area, backs up the data of the overlapping area by using the backup area before performing the capacity expansion, and guarantees the data security and stability of the disk array capacity expansion process at a minimum cost. The technical effects achieved by the present embodiment can be referred to the description in the foregoing, and will not be described here.

[0234] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be realized by means of software and necessary general hardware platforms. Based on such understanding, the technical solutions in the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The software product includes a plurality of instructions for causing a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present application.

[0235] The same or similar parts among various embodiments in the specification can be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can be referred to the description in the method embodiment.

[0236] In several embodiments provided by the present application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the above-described system embodiments are merely schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, system or module, and can be electrical, mechanical or other forms.

[0237] The modules described as separate components can or can not be physically separate, and the components displayed as modules can or can not be physical modules, that is, can be located in one place, or can be distributed to a plurality of network modules. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment.

[0238] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically, or two or more modules can be integrated into one module.

[0239] Although the present application is described in detail with reference to the preferred embodiments by means of the accompanying drawings, the present application is not limited to this. Various equivalent modifications or replacements can be made to the embodiments of the present application by those skilled in the art without departing from the spirit and essence of the present application, and these modifications or replacements should be within the scope of the present application. Any person skilled in the art in the technical field of the present application can easily think of changes or replacements within the technical range disclosed by the present application, and these changes or replacements should be within the protection scope of the present application.

Claims

1. A data protection method for disk array expansion, characterized in that, include: The size of the disk overlap area is calculated based on the disk array expansion information, where the overlap area is the data overlap area before and after the expansion. Create a backup area on the disk that is at least the size of the overlap area; Before performing the expansion, the original data in the overlapping area is backed up to the backup area; The size of the disk overlap area is calculated based on the disk array expansion information, including: Obtain the disk array expansion information, which includes the number of data disks before expansion and the number of data disks after expansion; Set the number of data disks before expansion to the number of stripes in the deformed area after expansion, and set the number of data disks after expansion to the number of stripes in the deformed area before expansion. The product of the number of strips in the expanded deformation zone and the number of strips in the deformation zone before expansion is set as the number of strips in the overlapping zone.

2. The method according to claim 1, characterized in that, Create a backup partition on the disk that is at least as large as the overlap area, including: Obtain the basic information of the disk array to be created, including the number of disks in the disk array; Based on the basic information, historical expansion information is obtained from the database, including the number of disks before and after the disk array expansion; Extract the maximum number of disks after expansion from the corresponding historical expansion information, and calculate the maximum backup area based on the maximum number of disks after expansion; Based on the maximum backup area, a backup area of ​​the corresponding size is reserved when creating the disk array.

3. The method according to claim 1, characterized in that, Create a backup partition on the disk that is at least as large as the overlap area, including: Based on the number of stripes corresponding to the disk overlap area, the first corresponding number of stripes are located as the disk overlap area, and the effective data volume of the original data in the disk overlap area is obtained; Calculate the required storage resources based on the amount of effective data; Based on the aforementioned requirements, a backup area of ​​appropriate size is allocated on the disk using storage resources.

4. The method according to claim 1, characterized in that, The method further includes: Once the original data backup in the overlapping area is confirmed to be complete, proceed with the expansion. Get the expansion progress; Based on the expansion progress, confirm that the overlapping area expansion is complete, clear the backup data and release the backup area.

5. The method according to claim 4, characterized in that, Get the expansion progress, including: Use the progress monitoring command on the disk array card to obtain the status and expansion progress of the disk array.

6. The method according to claim 5, characterized in that, Confirming the completion of the overlap area expansion based on the aforementioned expansion progress includes: Set the target percentage of the overlapping area based on the proportion of the overlapping area to the total disk storage space. Obtain the disk's progress percentage from the expansion progress, determine whether the progress percentage has reached the target percentage, and if the progress percentage has reached the target percentage, confirm that the disk's overlap area expansion is complete.

7. The method according to claim 4, characterized in that, The method further includes: If the expansion progress stalls, the location of the target deformation zone with abnormality is confirmed. If the target deformation area is within the overlapping area, the data of the target deformation area is restored based on the corresponding backup data in the backup area; If the target deformation area is not within the overlapping area, data recovery will not be performed.

8. A terminal, characterized in that, include: The memory is used to store data protection programs during disk array expansion. A processor, configured to implement the steps of the data protection method for disk array expansion state as described in any one of claims 1-7 when executing the data protection program for the disk array expansion state.

9. A computer-readable storage medium storing a computer program, characterized in that, The readable storage medium stores a data protection program for disk array expansion, and when the data protection program for disk array expansion is executed by the processor, it implements the steps of the data protection method for disk array expansion as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Storage system hard disk expansion realization method

    CN107562377A

  • Disk array capacity expansion method and device

    CN113849124A