WO2024098698A1 - 一种磁盘阵列初始化方法、装置、设备及可读存储介质 - Google Patents
一种磁盘阵列初始化方法、装置、设备及可读存储介质 Download PDFInfo
- Publication number
- WO2024098698A1 WO2024098698A1 PCT/CN2023/093312 CN2023093312W WO2024098698A1 WO 2024098698 A1 WO2024098698 A1 WO 2024098698A1 CN 2023093312 W CN2023093312 W CN 2023093312W WO 2024098698 A1 WO2024098698 A1 WO 2024098698A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- stripe
- sliding window
- initialization
- window
- initialized
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
Definitions
- the present application relates to the field of storage technology, and in particular to a disk array initialization method, device, equipment and readable storage medium.
- RAID Redundant Array of Independent Disks
- RAID is a redundant array composed of independent disks. It is composed of many independent disks, combined into a disk group with huge capacity, and uses the additive effect of individual disks to provide data to improve the performance of the entire disk system. Based on RAID, data can be cut into many segments and stored on each hard disk.
- the RAID array After the RAID array is created, it needs to be initialized in stripes. During the initialization process, the stripes are managed using a bitmap metadata organization method. Each bit in the bitmap data structure represents a stripe, and stripes can be set and cleared, but cannot be assigned values.
- This metadata organization method has shortcomings in large and large-capacity RAID arrays: the bitmap metadata organization method takes up a lot of resource space, which will cause the initialization task of a large-capacity RAID array to take a long time, resulting in a decrease in user experience, and there is a risk of stripe inconsistency in the case of urgent foreground IO tasks.
- the purpose of this application is to provide a disk array initialization method, device, equipment and readable storage medium, which can reduce the initialization memory usage and improve the RAID initialization efficiency.
- a disk array initialization method comprising:
- a sliding window is set starting from the first address of the stripe
- the process returns to the step of executing the initialization task for the stripe corresponding to the current sliding window until all the stripes of the RAID array are initialized.
- setting a sliding window starting from the first address of the stripe includes:
- assigning a value to a stripe mark includes:
- the stripe flags are assigned values using the respective stripe bit flags.
- three unsigned data are applied to construct a sliding window, including:
- performing an initialization task on a strip corresponding to the current sliding window includes:
- the water level pointer is updated until the stripe corresponding to the current sliding window is initialized;
- the initialization task is performed on the target stripe, and after the initialization task is performed, the water level pointer is updated until it is determined that the stripe corresponding to the current sliding window is initialized.
- determining that the strip corresponding to the current sliding window has been initialized includes:
- determining that the strip corresponding to the current sliding window has been initialized includes:
- moving the sliding window includes:
- the window offset is used to determine whether all stripes of the RAID array have been initialized, including:
- window offset is equal to the total number of windows, it is determined that all stripes of the RAID array have been initialized
- window offset is not equal to the total number of windows, it is determined that all stripes of the RAID array have not been completely initialized.
- the process of obtaining the total number of windows includes:
- moving the sliding window includes:
- moving the sliding window includes:
- the stripe mark is assigned a value.
- a disk array initialization device comprising:
- a sliding window initialization module is used to set a sliding window starting from the first address of the stripe after receiving an initialization request of the RAID array;
- the strip initialization module is used to perform the initialization task on the strip corresponding to the current sliding window; after initializing the strip corresponding to the current sliding window, the sliding window is moved; after the window movement is completed, the strip corresponding to the current sliding window is returned to execute Execute the steps of the initialization task until all stripes of the RAID array are initialized.
- An electronic device comprising:
- the processor is used to implement the steps of the disk array initialization method when executing the computer program.
- a non-volatile readable storage medium stores a computer program, which implements the steps of the disk array initialization method when executed by a processor.
- a sliding window is set starting from the stripe head address; an initialization task is performed on the stripe corresponding to the current sliding window; after initializing the stripe corresponding to the current sliding window, the sliding window is moved; after completing the window movement, the step of performing the initialization task on the stripe corresponding to the current sliding window is returned until all stripes of the RAID array are initialized.
- the sliding window is first set, and then the initialization task is performed for the stripe corresponding to the sliding window. After the stripe corresponding to the current sliding window is initialized, the sliding window is moved, and the initialization task is continued for the stripe corresponding to the current sliding window until all the stripes of the RAID array are initialized. That is to say, when the stripes of the RAID array are initialized, only the stripes within the sliding window are always initialized.
- the embodiments of the present application also provide a disk array initialization device, equipment and readable storage medium corresponding to the above disk array initialization method, which have the above technical effects and are not described in detail here.
- FIG1 is a flowchart of a disk array initialization method according to an embodiment of the present application.
- FIG2 is a schematic diagram of RAID6
- FIG3 is a schematic diagram of the structure of a disk array initialization device according to an embodiment of the present application.
- FIG4 is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
- FIG. 5 is a schematic diagram of a specific structure of an electronic device in an embodiment of the present application.
- FIG. 1 is a flow chart of a disk array initialization method according to an embodiment of the present application. The method comprises the following steps:
- a RAID initialization request sent by an upper layer application may be received.
- a dynamic sliding window is used to initialize the RAID array.
- a sliding window can be set accordingly.
- the sliding window can be set from the beginning of the stripe head address of the RAID array or from the beginning of the APU stripe head address saved by the two nodes in the cluster.
- the window size of the sliding window can be set and adjusted according to actual needs. For example, the window size can be set to 32 (of course, in actual applications, this value can also be increased or decreased), that is, the initialization task of 32 stripes is processed before each sliding of the sliding window.
- APU atomic parity update
- RAID module for the checksum data generated by the write request
- the purpose is to ensure that the consistency of the stripe is restored after a system abnormality (such as power failure, controller failure, etc.).
- Its content includes RAID stripe address, data, and checksum.
- IOGROUP that is, in order to ensure the high availability of the system in the storage system, two nodes will be used to form an IOGROUP.
- the two nodes are respectively connected to a port of the dual-port hard disk.
- the two nodes in the IOGROUP are each other's peer nodes.
- One or more IOGROUPs form a cluster, and the nodes in the cluster can communicate with each other.
- setting a sliding window starting from the first address of the stripe includes:
- Step 1 Apply for three unsigned data to build a sliding window; the three unsigned data respectively record the water level pointer, window offset and stripe mark;
- Step 2 Point the water level pointer to the beginning of the stripe's first address
- Step 3 Initialize the window offset
- Step 4 Assign values to the stripe tags.
- BBU battery backup unit
- the water level pointer refers to which stripe corresponding to the sliding window needs to be processed at present
- the window offset refers to the number of sliding window movements or the window order
- the stripe mark refers to the mark of whether each stripe corresponding to the sliding window needs to be initialized.
- 0 can be used to indicate that initialization is required
- 1 can be used to indicate that it has been initialized
- 1 can be used to indicate that initialization is required
- 0 can be used to indicate that it has been initialized.
- there is no limitation on which data is used to represent which content for unsigned data For example, the first unsigned data can be used to represent the water level pointer, the second unsigned data can be used to represent the window offset, and the third unsigned data can be used to represent the stripe mark; it can also be adjusted to other corresponding situations.
- the three unsigned data after applying for three unsigned data, can be assigned values.
- the water level pointer can be pointed to the beginning of the stripe first address, that is, the water level pointer points to the first stripe corresponding to the sliding window; the window offset is initialized to 0 or 1; the initialization state of the stripe corresponding to the current sliding window is obtained, and the stripe mark is assigned a value based on the initialization state.
- the initialization progress of all stripes in the RAID array can be tracked through three unsigned 4-byte data.
- the client clears all stripes of the RAID array until the end of the stripe of the array is reached.
- an unsigned 4-byte data is used to give the window offset of the sliding window
- another unsigned 4-byte data 32 bits record the initialization status of the stripe performing the initialization task
- the last unsigned 4-byte data is the watermark.
- assigning a value to a stripe mark includes:
- Step 1 Read the stripe bit marks corresponding to the plurality of stripes corresponding to the window size of the sliding window from the stripe bitmap file in the RAID array, starting from the first stripe;
- Step 2 Use each stripe bit mark to assign a value to the stripe mark.
- a stripe bitmap file can be maintained at the end of the file to identify the status of each stripe, including the stripe initialization status. Therefore, in an embodiment of the present application, the stripe bit marks corresponding to multiple stripes corresponding to the window size of the sliding window can be read from the stripe bitmap file, starting from the first stripe. After obtaining the stripe bit mark, the stripe mark can be assigned a value using each stripe bit mark. That is to say, in this embodiment, the stripe mark only corresponds to the bitmap information corresponding to the stripe of the window size, without the need to store the entire bitmap file in the memory, which can greatly reduce the memory usage.
- Figure 2 is a schematic diagram of RAID6, which is an array composed of 4-16 disks.
- a stripe is composed of blocks (strips).
- the RAID6 array is composed of 6 member disks, each row is a stripe, and if each member disk has a capacity of 170G, the array has a capacity of 1TB.
- the strip size of the block is 256KB, and the strip size is 1536KB. Therefore, there are 699051 stripes of 1TB/1536KB in the array. According to one stripe corresponding to one bit, 699051 bits are required, which is converted to (699051/8) 87382 bytes. It is concluded that 87382 bytes of memory space are required to store bitmap metadata.
- the window size can be set as needed, such as 32 bits. After creating or moving a sliding window, only the bitmap information of the strips corresponding to the window size corresponding to the sliding window needs to be saved in the memory, such as the bitmap information corresponding to 32 strips, that is, 32 bytes and 4 bytes of data. This can greatly reduce the memory resource usage.
- the initialization task is directly performed on strips 0 to 31 corresponding to the sliding window, that is, a total of 32 strips. If the current sliding window slides once, the initialization task is directly performed on strips 32 to 63 corresponding to the current sliding window, that is, 32 strips.
- Initializing a stripe means initializing all the blocks corresponding to the stripe.
- Block also known as strip/chunk; a partition is divided into multiple blocks of equal size and adjacent addresses. These blocks are called blocks. Blocks are usually considered to be elements of a stripe.
- the virtual disk uses it as a unit to map the address of the virtual disk to the address of the member disk.
- Stripe also known as stride, is a collection of position-related strips on different partitions of the array, and is the unit for organizing blocks on different partitions.
- the stripe stride0 in Figure 2 it needs to be initialized, that is, it is necessary to initialize 2 in disk 0, 3 in disk 2, 5 in disk 3, P in disk 4, and Q in disk 5.
- the data 2, 3, 4 and 5 in the disks correspond to the striped data
- P represents the check data
- Q is the second check data.
- performing an initialization task on a strip corresponding to the current sliding window includes:
- Step 1 read the target stripe mark corresponding to the water level pointer from the stripe mark; wherein the target stripe mark is the mark of the target stripe;
- Step 2 If the target stripe mark corresponds to initialization, update the water level pointer until the stripe corresponding to the current sliding window is initialized;
- Step 3 If the target stripe mark corresponds to uninitialized, perform the initialization task on the target stripe, and after completing the initialization task, update the water level pointer until the stripe corresponding to the current sliding window is initialized.
- the target stripe mark corresponding to the water level pointer can be read from the stripe mark first; wherein the target stripe mark is the mark of the target stripe. If the target stripe mark corresponds to initialized, the water level pointer is updated, such as adding one; if the target stripe mark corresponds to uninitialized, the water level pointer is updated after the initialization task is performed on the target stripe. The water level pointer is updated until it is determined that the stripe corresponding to the current sliding window has been initialized.
- the water level pointer is directly increased by one; when the stripe mark corresponding to the target stripe corresponding to the current water level pointer is read as 0, the target stripe is initialized alone. After the initialization is completed, if it is determined that the target stripe is not the last stripe of the current sliding window, the water level pointer is increased by one, that is, it moves to the next stripe for judgment and processing.
- the water level pointer needs to be updated. That is, the water level pointer identifies the stripe currently being processed.
- At least one of the following methods may be used to confirm whether the strips corresponding to the current sliding window have been fully initialized. It should be noted that when two methods are used, it is possible to confirm whether the strips corresponding to the current sliding window have been fully initialized when the conclusions of both methods are that they have been fully initialized.
- Method 1 Determine the strip corresponding to the current sliding window after initialization, including:
- Step 1 Determine whether the water level offset corresponding to the water level pointer is equal to the size of the sliding window
- Step 2 If the water level offset corresponding to the water level pointer is equal to the size of the sliding window, it is determined that the strip corresponding to the current sliding window has been initialized;
- Step 3 If the water level offset corresponding to the water level pointer is not equal to the size of the sliding window, it is determined that the strip corresponding to the current sliding window has not been initialized.
- the water level offset of the water level pointer is increased by 1.
- the window size is 32
- the initial water level offset of the water level pointer is 1
- the water level offset is 32, which indicates that all 32 strips have been initialized, and it is determined that all strips corresponding to the current sliding window have been initialized.
- Method 2 determining the strip corresponding to the current sliding window after initialization, includes:
- Step 1 Determine whether all the tags in the strip tag have been initialized
- Step 2 If all the marks in the strip mark have been initialized, it is determined that the strip corresponding to the current sliding window has been initialized;
- Step 3 If each mark in the strip mark has not been initialized, it is determined that the strip corresponding to the current sliding window has not been initialized.
- each mark in the strip mark marks the initialization state of the strip corresponding to the sliding window, and each time a strip is confirmed to be initialized, the mark of the strip is modified, it can be clearly determined whether all the strips corresponding to the current sliding window have been initialized through the strip mark. That is, by verifying whether each mark in the strip mark corresponds to initialization, it can be determined whether the strip corresponding to the current sliding window has been initialized. Specifically, when all marks in the strip mark correspond to initialization, it can be determined that the strip corresponding to the current sliding window has been initialized, otherwise, the strip corresponding to the current sliding window has not been initialized.
- the process returns to the step of executing the initialization task for the stripe corresponding to the current sliding window until all the stripes of the RAID array are initialized.
- the sliding window can be moved.
- step S102 the process returns to step S102 to continue to perform the initialization task on the stripe corresponding to the current sliding window until all stripes of the RAID array are initialized.
- the sliding window does not need to be moved, but all stripes of the RAID array are directly confirmed to have been initialized.
- Method 1 moving the sliding window, including:
- Step 1 Use the window offset to determine whether all stripes of the RAID array have been initialized
- Step 2 If all stripes of the RAID array have not been initialized, move the sliding window.
- the window offset corresponds to the number of sliding window moves or the window order.
- the number of moves is 0 and the window order is 1.
- the number of moves and the window order are increased by 1. Since the number of stripes in a RAID array is fixed and limited, the number of times the sliding window needs to be moved and the corresponding window order are also limited and fixed. Therefore, based on the window offset, it can be determined whether all stripes of the RAID array have been initialized.
- the window offset is used to determine whether all stripes of the RAID array have been initialized, including:
- Step 1 Determine whether the window offset is equal to the total number of windows
- Step 2 If the window offset is equal to the total number of windows, it is determined that all stripes of the RAID array have been initialized
- Step 3 If the window offset is not equal to the total number of windows, it is determined that all stripes of the RAID array have not been initialized.
- the window offset specifically corresponds to the window order and the window offset is equal to the total number of windows, it indicates that the current sliding window corresponds to the last sliding window, that is, the last stripe has been processed, and thus it can be determined that all stripes of the RAID array have been initialized.
- the window offset specifically corresponds to the window order and the window offset is equal to the total number of windows minus 1, it also indicates that the current sliding window has corresponded to the last sliding window, that is, the last stripe has been processed, so it can be determined that all stripes of the RAID array have been initialized.
- the process of obtaining the total number of windows includes:
- Step 1 Get the total number of stripes corresponding to the RAID array
- Step 2 obtain the window size of the sliding window
- Step 3 Calculate the total number of windows using the total number of stripes and window size.
- the total number of stripes is fixed after the RAID array is created.
- the value can be directly read from the storage medium, or directly calculated based on the structure of the RAID array and the size of the storage space.
- the specific calculation method can refer to the description above.
- the window size also sets its value when it is created, so the value can be directly obtained. After obtaining the total number of stripes and the window size, the total number of stripes can be directly compared with the window size, and the ratio is the total number of windows.
- Method 2 moving the sliding window, includes:
- Step 1 determine whether each stripe in the stripe bitmap file in the RAID array has a corresponding initialized mark
- Step 2 If each strip in the strip bitmap file does not correspond to an initialized mark, move the sliding window.
- the stripe bitmap file in the RAID array will be continuously updated, that is, it can also be updated during the initialization process, it is directly judged whether each stripe in the stripe bitmap file in the RAID array has corresponded to the initialized mark. If each stripe in the stripe bitmap file has corresponded to the initialized mark, it can be determined that all stripes in the RAID array have been initialized. Otherwise, it can be determined that all stripes in the RAID array have not been fully initialized.
- moving the sliding window includes:
- Step 1 Move the sliding window by a window size
- Step 2 Point the water level pointer to the address of the first stripe in the sliding window
- Step 3 Add one to the window offset
- Step 4 Assign values to the stripe tags.
- window size of the sliding window is 64, when the sliding window is moved once, 64 strips are moved, so that the sliding window after the movement corresponds to 64 strips continuous after the last strip processed last time.
- the water level pointer is re-pointed to the address of the first stripe corresponding to the sliding window; the offset of the window is also increased by 1.
- the stripe mark is assigned a value, and the assignment method is to read the initialization state marks of multiple stripes corresponding to the new sliding window, and assign the stripe mark based on the marks, so that the stripe mark can indicate the initialization state of the multiple stripes corresponding to the current one.
- Applying the method provided in the embodiment of the present application applying the method provided in the embodiment of the present application, after receiving an initialization request for a RAID array, setting a sliding window starting from the stripe head address; performing an initialization task on the stripe corresponding to the current sliding window; after initializing the stripe corresponding to the current sliding window, moving the sliding window; after completing the window movement, returning to the step of performing the initialization task on the stripe corresponding to the current sliding window until all stripes of the RAID array are initialized.
- the sliding window is first set, and then the initialization task is executed for the stripe corresponding to the window. After the stripe corresponding to the current sliding window is initialized, the sliding window is moved, and the initialization task is continued for the stripe corresponding to the current sliding window until all the stripes of the RAID array are initialized. In other words, when initializing the stripes of the RAID array, only the stripes within the sliding window are initialized.
- the disk array initialization method provided in the embodiment of the present application, specifically how to solve the problem that the metadata organization method occupies too much memory resources when controlling the initialization task, thereby solving the problem of reduced RAID array performance.
- the disk array initialization method is described in detail below using a specific application scenario as an example.
- the initialization progress of all stripes in the RAID array can be tracked through three unsigned 4-byte data.
- the client clears all stripes of the RAID array until the end of the stripe of the array is reached.
- an unsigned 4-byte data is used to give the offset of the sliding window (i.e., the window offset)
- another unsigned 4-byte data of 32 bits records the stripe that performs the initialization task (i.e., the stripe mark)
- the last unsigned 4-byte data is the watermark.
- the water level is the sliding window offset mentioned above, the bitmap is the bitmap of all strips in the management window, and the water level pointer points to the strip that needs to perform the initialization task.
- RK_META_ITER_WINDOW is the window size defined by the macro, and the default is 32. As shown below:
- Step 1 Request three unsigned 4-byte data from the harden memory protected by the BBU (battery backup unit), and save the RAID array stripe address in the harden memory protected by the BBU.
- Step 2 Set the first window from the beginning of the RAID array stripe address, for example, define the first window for executing the initialization task as the RK_META_ITER_WINDOW macro definition window. Define RK_META_ITER_WINDOW to 32.
- Step 3 Enter the RAID array stripe address and calculate the number of RAID array stripes based on the RAID array capacity.
- Step 4 Set the Watermark pointer to point to the first bit of the window, and determine whether the bit pointed to by the Watermark pointer is 1. If it is 1, skip the bit and move the watermark pointer to the next bit. If it is 0, execute the bit The initialization task of the stripe marked by the bit, the data is written to zero.
- Step 5 Every time the Watermark pointer moves one bit, the water level offset must be determined, that is, whether the water level offset is equal to the sliding window RK_META_ITER_WINDOW value window size. If it is equal, the window is moved by 32 bits and the Watermark pointer is moved to the head of the window.
- Step 6 Based on the number of stripes and the number of window movements obtained in the third step, as well as the offset of the Watermark pointer, determine whether the initialization task is completed.
- the memory resources occupied by this application are three unsigned 4-byte data, which greatly reduces the memory usage and speeds up the initialization rate.
- the embodiment of the present application further provides a disk array initialization device.
- the disk array initialization device described below and the disk array initialization method described above can refer to each other.
- the device includes the following modules:
- the sliding window initialization module 100 is used to set the sliding window starting from the stripe head address after receiving the initialization request of the RAID array;
- the stripe initialization module 200 is used to perform the initialization task on the stripe corresponding to the current sliding window; after initializing the stripe corresponding to the current sliding window, move the sliding window; after completing the window movement, return to the step of performing the initialization task on the stripe corresponding to the current sliding window until all stripes of the RAID array are initialized.
- a sliding window is set starting from the stripe head address; an initialization task is performed on the stripe corresponding to the current sliding window; after initializing the stripe corresponding to the current sliding window, the sliding window is moved; after completing the window movement, the step of performing the initialization task on the stripe corresponding to the current sliding window is returned until all stripes of the RAID array are initialized.
- the sliding window is first set, and then the initialization task is performed for the stripe corresponding to the return window. After the stripe corresponding to the current sliding window is initialized, the sliding window is moved, and the initialization task is continued for the stripe corresponding to the current sliding window until all the stripes of the RAID array are initialized. That is to say, when the stripes of the RAID array are initialized, only the stripes within the sliding window are always initialized.
- the sliding window initialization module 100 is specifically used to apply for three unsigned data to construct a sliding window; the three unsigned data respectively record a water level pointer, a window offset and a stripe mark;
- the sliding window initialization module 100 is specifically used to read the stripe bit marks corresponding to the plurality of stripes corresponding to the window size of the sliding window, starting from the first stripe, from the stripe bitmap file in the RAID array;
- the stripe flags are assigned values using the respective stripe bit flags.
- the sliding window initialization module 100 is specifically used to apply for unsigned data from a memory protected by a battery backup unit to prevent data loss due to power failure.
- the stripe initialization module 200 is specifically used to read the target stripe mark corresponding to the water level pointer from the stripe mark; wherein the target stripe mark is the mark of the target stripe;
- the water level pointer is updated until the stripe corresponding to the current sliding window is initialized;
- the initialization task is performed on the target stripe, and after the initialization task is performed, the water level pointer is updated until it is determined that the stripe corresponding to the current sliding window is initialized.
- the stripe initialization module 200 is specifically used to determine whether the water level offset corresponding to the water level pointer is equal to the size of the sliding window;
- the stripe initialization module 200 is specifically used to determine whether each mark in the stripe mark corresponds to initialization
- the stripe initialization module 200 is specifically used to use the window offset to determine whether to initialize All stripes of the RAID array have been finalized;
- the stripe initialization module 200 is specifically used to determine whether the window offset is equal to the total number of windows
- window offset is equal to the total number of windows, it is determined that all stripes of the RAID array have been initialized
- window offset is not equal to the total number of windows, it is determined that all stripes of the RAID array have not been completely initialized.
- the stripe initialization module 200 is specifically used to obtain the total number of stripes corresponding to the RAID array;
- the stripe initialization module 200 is specifically used to determine whether each stripe in the stripe bitmap file in the RAID array has a corresponding initialized mark;
- the strip initialization module 200 is specifically used to move the sliding window by a window size
- the embodiment of the present application further provides an electronic device.
- the electronic device described below and the disk array initialization method described above can refer to each other.
- the electronic device includes:
- the processor 322 is used to implement the steps of the disk array initialization method of the above method embodiment when executing the computer program.
- FIG. 5 is a schematic diagram of the specific structure of an electronic device provided in this embodiment.
- the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer applications 342 or data 344.
- the memory 332 can be a temporary storage or a permanent storage.
- the program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device.
- the central processing unit 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
- the electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and/or one or more operating systems 341 .
- the steps in the disk array initialization method described above can be implemented by the structure of an electronic device.
- the embodiment of the present application further provides a non-volatile readable storage medium.
- the non-volatile readable storage medium described below and the disk array initialization method described above can refer to each other.
- a non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the disk array initialization method of the above method embodiment are implemented.
- the non-volatile readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other readable storage media that can store program codes.
- each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments.
- the same or similar parts between the embodiments can be referred to each other.
- the description is relatively simple, and the relevant parts can be referred to the method part.
- the steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two.
- the software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (20)
- 一种磁盘阵列初始化方法,其特征在于,包括:接收RAID阵列的初始化请求后,从条带首地址开始处设置滑动窗口;对当前所述滑动窗口对应的条带执行初始化任务;初始化完所述当前所述滑动窗口对应的条带后,移动所述滑动窗口;完成窗口移动后,返回执行所述对当前所述滑动窗口对应的条带执行初始化任务的步骤,直到初始化完所述RAID阵列的所有条带。
- 根据权利要求1所述的磁盘阵列初始化方法,其特征在于,所述从条带首地址开始处设置滑动窗口,包括:从所述RAID阵列的条带首地址开始处或从集群中双节点保存的APU条带首地址开始处设置所述滑动窗口。
- 根据权利要求1所述的磁盘阵列初始化方法,其特征在于,所述从条带首地址开始处设置滑动窗口,包括:申请三个无符号数据构建所述滑动窗口;所述三个无符号数据分别记录水位指针、窗口偏移量和条带标记;将所述水位指针指向所述条带首地址开始处;初始化所述窗口偏移量;对所述条带标记进行赋值。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述对所述条带标记进行赋值,包括:获取所述滑动窗口对应的条带的初始化状态,并基于所述初始化状态对所述条带标记进行赋值。
- 根据权利要求4所述的磁盘阵列初始化方法,其特征在于,所述获取所述滑动窗口对应的条带的初始化状态,并基于所述初始化状态对所述条带标记进行赋值,包括:从所述RAID阵列中的条带位图文件中,从首个条带开始,读取所述滑动窗口的窗口大小对应的多个条带分别对应的条带比特位标记;利用各个所述条带比特位标记对所述条带标记进行赋值。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述申请三个无符号数据构建所述滑动窗口,包括:从电池备电单元保护的防掉电丢失数据的内存中申请所述无符号数据。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述对当前所述滑动窗口对应的条带执行初始化任务,包括:从所述条带标记中读取所述水位指针对应的目标条带标记;其中,所述目标条带标记为目标条带的标记;若所述目标条带标记对应已初始化,则更新所述水位指针,直到确定初始化完所述当前所述滑动窗口对应的条带;若所述目标条带标记对应未初始化,则对所述目标条带执行初始化任务,并在执行完所述初始化任务后,更新所述水位指针,直到确定初始化完所述当前所述滑动窗口对应的条带。
- 根据权利要求7所述的磁盘阵列初始化方法,其特征在于,所述确定初始化完所述当前所述滑动窗口对应的条带,包括:判断所述水位指针对应的水位偏移量是否等于所述滑动窗口的大小;如果所述水位指针对应的水位偏移量等于所述滑动窗口的大小,则确定初始化完所述当前所述滑动窗口对应的条带;如果所述水位指针对应的水位偏移量不等于所述滑动窗口的大小,则确定未初始化完所述当前所述滑动窗口对应的条带。
- 根据权利要求8所述的磁盘阵列初始化方法,其特征在于,所述确定初始化完所述当前所述滑动窗口对应的条带,包括:判断所述条带标记中的各个标记是否均对应已初始化。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述移动所述滑动窗口,包括:利用所述窗口偏移量,判断是否初始化完所述RAID阵列的所有条带;如果未初始化完所述RAID阵列的所有条带,则移动所述滑动窗口。
- 根据权利要求10所述的磁盘阵列初始化方法,其特征在于,所述利用所述窗口偏移量,判断是否初始化完所述RAID阵列的所有条带,包括:判断所述窗口偏移量是否等于窗口总数;如果所述窗口偏移量等于所述窗口总数,则确定已初始化完所述RAID阵列的所有条带;如果所述窗口偏移量不等于所述窗口总数,则确定未完成初始化所述RAID阵列的所有条带。
- 根据权利要求11所述的磁盘阵列初始化方法,其特征在于,所述窗口总数的获取过程,包括:获取所述RAID阵列对应的条带总数;获取所述滑动窗口的窗口大小;利用所述条带总数与所述窗口大小,计算所述窗口总数。
- 根据权利要求12所述的磁盘阵列初始化方法,其特征在于,所述获取所述RAID阵列对应的条带总数,包括:从存储介质中读取所述条带总数。
- 根据权利要求12所述的磁盘阵列初始化方法,其特征在于,所述利用所述条带总数与所述窗口大小,计算所述窗口总数,包括:将所述条带总数与所述窗口大小的比值确定为所述窗口总数。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述移动所述滑动窗口,包括:判断所述RAID阵列中的条带位图文件中各个所述条带是否已对应已初始化标记。
- 根据权利要求3所述的磁盘阵列初始化方法,其特征在于,所述移动所述滑动窗口,包括:对所述滑动窗口进行一个窗口大小的移动;将所述水位指针指向所述滑动窗口中对应的第一个条带的地址;对所述窗口偏移量进行加一处理。
- 根据权利要求1所述的磁盘阵列初始化方法,其特征在于,所述滑动窗口用于限制每次初始化为一个滑动窗口对应的条带初始化任务,在紧急IO任务情况下,减低条带不一致风险概率。
- 一种磁盘阵列初始化装置,其特征在于,包括:滑动窗口初始化模块,用于接收RAID阵列的初始化请求后,从条带首地址开始处设置滑动窗口;条带初始化模块,用于对当前所述滑动窗口对应的条带执行初始化任务;初始化完所述当前所述滑动窗口对应的条带后,移动所述滑动窗口;完成窗口移动后,返回执行所述对当前所述滑动窗口对应的条带执行初始化任务的步骤,直到初始化完所述RAID阵列的所有条带。
- 一种电子设备,其特征在于,包括:存储器,用于存储计算机程序;处理器,用于执行所述计算机程序时实现如权利要求1至17任一项所述磁盘阵列初始化方法的步骤。
- 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至17任一项所述磁盘阵列初始化方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211409857.X | 2022-11-11 | ||
| CN202211409857.XA CN115657960B (zh) | 2022-11-11 | 2022-11-11 | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024098698A1 true WO2024098698A1 (zh) | 2024-05-16 |
Family
ID=85021881
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/093312 Ceased WO2024098698A1 (zh) | 2022-11-11 | 2023-05-10 | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115657960B (zh) |
| WO (1) | WO2024098698A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120215842A (zh) * | 2025-05-28 | 2025-06-27 | 苏州元脑智能科技有限公司 | 一种存储系统的分块编码确定方法及存储系统 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115657960B (zh) * | 2022-11-11 | 2023-03-14 | 苏州浪潮智能科技有限公司 | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 |
| CN117931484B (zh) * | 2024-03-22 | 2024-06-14 | 中国人民解放军国防科技大学 | 基于滑动窗口的消息消费方法、装置、设备及存储介质 |
| CN120353508B (zh) * | 2025-06-23 | 2025-09-23 | 苏州元脑智能科技有限公司 | 磁盘阵列的初始化方法及存储集群 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100268876A1 (en) * | 2009-04-20 | 2010-10-21 | Microsoft Corporation | Sliding-window multi-class striping |
| CN113849124A (zh) * | 2021-08-27 | 2021-12-28 | 苏州浪潮智能科技有限公司 | 一种磁盘阵列扩容方法及装置 |
| CN115098046A (zh) * | 2022-08-26 | 2022-09-23 | 苏州浪潮智能科技有限公司 | 磁盘阵列初始化方法、系统、电子设备及存储介质 |
| CN115657960A (zh) * | 2022-11-11 | 2023-01-31 | 苏州浪潮智能科技有限公司 | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 |
-
2022
- 2022-11-11 CN CN202211409857.XA patent/CN115657960B/zh active Active
-
2023
- 2023-05-10 WO PCT/CN2023/093312 patent/WO2024098698A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100268876A1 (en) * | 2009-04-20 | 2010-10-21 | Microsoft Corporation | Sliding-window multi-class striping |
| CN113849124A (zh) * | 2021-08-27 | 2021-12-28 | 苏州浪潮智能科技有限公司 | 一种磁盘阵列扩容方法及装置 |
| CN115098046A (zh) * | 2022-08-26 | 2022-09-23 | 苏州浪潮智能科技有限公司 | 磁盘阵列初始化方法、系统、电子设备及存储介质 |
| CN115657960A (zh) * | 2022-11-11 | 2023-01-31 | 苏州浪潮智能科技有限公司 | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120215842A (zh) * | 2025-05-28 | 2025-06-27 | 苏州元脑智能科技有限公司 | 一种存储系统的分块编码确定方法及存储系统 |
| CN120215842B (zh) * | 2025-05-28 | 2025-08-08 | 苏州元脑智能科技有限公司 | 一种存储系统的分块编码确定方法及存储系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115657960B (zh) | 2023-03-14 |
| CN115657960A (zh) | 2023-01-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2024098698A1 (zh) | 一种磁盘阵列初始化方法、装置、设备及可读存储介质 | |
| JP6300132B2 (ja) | ガベージデータを収集するための方法及び記憶装置 | |
| US9058125B2 (en) | Computer system, computer and method for performing thin provisioning capacity management in coordination with virtual machines | |
| EP3617867B1 (en) | Fragment management method and fragment management apparatus | |
| CN112130768B (zh) | 磁盘阵列在线扩容方法、装置及计算机可读存储介质 | |
| CN115543696B (zh) | 一种磁盘阵列重构任务加速方法、系统、存储介质及设备 | |
| CN103514249A (zh) | 一种数据自精简方法和系统及存储装置 | |
| US20190243553A1 (en) | Storage system, computer-readable recording medium, and control method for system | |
| CN102185929A (zh) | 一种基于san资源的视频监控数据存储方法及其装置 | |
| CN115437581B (zh) | 一种数据处理方法、装置、设备及可读存储介质 | |
| WO2017173623A1 (zh) | 用于处理存储设备中分条的方法和存储设备 | |
| CN116339644B (zh) | 一种独立磁盘冗余阵列创建方法、装置、设备及介质 | |
| CN104572492A (zh) | 一种烧录数据到fat32分区的方法和装置 | |
| CN106201652A (zh) | 一种数据处理方法及虚拟机 | |
| CN107589916A (zh) | 一种基于纠删码的纠删池的创建方法及相关装置 | |
| US10282116B2 (en) | Method and system for hardware accelerated cache flush | |
| CN116009761A (zh) | 一种数据写入方法以及相关设备 | |
| WO2025102603A1 (zh) | 一种磁盘阵列的扩容方法、装置、存储系统及产品 | |
| CN115904255A (zh) | 一种数据请求方法、装置、设备及存储介质 | |
| WO2020215223A1 (zh) | 分布式存储系统和分布式存储系统中垃圾回收方法 | |
| CN120492366A (zh) | 存储空间的管理方法和装置、存储介质、电子设备、程序产品 | |
| CN120255809A (zh) | 元数据管理方法、装置、电子设备和存储介质 | |
| CN117149094B (zh) | 确定数据区状态的方法、装置、磁盘阵列及存储系统 | |
| EP4160422B1 (en) | Method for using intermediate device to process data, computer system, and intermediate device | |
| CN114265562B (zh) | 一种基于flash存储器的文件存储方法和系统 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23887398 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23887398 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24/10/2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23887398 Country of ref document: EP Kind code of ref document: A1 |