CN115576501B - Node updating method, system and related device of RAID card - Google Patents

Node updating method, system and related device of RAID card Download PDF

Info

Publication number
CN115576501B
CN115576501B CN202211554112.2A CN202211554112A CN115576501B CN 115576501 B CN115576501 B CN 115576501B CN 202211554112 A CN202211554112 A CN 202211554112A CN 115576501 B CN115576501 B CN 115576501B
Authority
CN
China
Prior art keywords
node
cache node
instruction
cache
linked list
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.)
Active
Application number
CN202211554112.2A
Other languages
Chinese (zh)
Other versions
CN115576501A (en
Inventor
李飞龙
许永良
孙明刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211554112.2A priority Critical patent/CN115576501B/en
Publication of CN115576501A publication Critical patent/CN115576501A/en
Application granted granted Critical
Publication of CN115576501B publication Critical patent/CN115576501B/en
Priority to PCT/CN2023/101696 priority patent/WO2024119775A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a node updating method of a RAID card, which comprises the following steps: when a node updating instruction is detected, judging the updating type of the node updating instruction; if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from the global idle cache node linked list, and inserting the idle cache node to a designated position corresponding to the capacity expansion instruction; and if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node. The method and the device can greatly reduce the utilization rate of CPU resources, and can greatly improve the online capacity expansion and online capacity contraction rate of the RAID array. The application also provides a node updating system of the RAID card, a computer readable storage medium and a storage device, which have the beneficial effects.

Description

Node updating method, system and related device of RAID card
Technical Field
The present application relates to the field of data storage, and in particular, to a node updating method and system for a RAID card, and a related apparatus.
Background
In the field of storage, the industry currently has a soft RAID storage technology and a hard RAID storage technology, the soft RAID storage technology is realized by software for managing stripe and chunk stripe in a RAID array as the name implies, and the hard RAID storage technology (i.e., a RAID card) is realized by hardware for managing data. A RAID card controller is added in the RAID card, and the RAID card controller is a chip and consists of a series of components such as an I/O processor, a disk controller, a disk connector, a cache and the like.
Because the industry uses a one-dimensional linear table metadata organization mode to manage cache nodes, the insertion and deletion of the cache nodes are very complicated, a large amount of mobile data is needed, the cache performance of the RAID card is reduced, the online expansion and online reduction process of the RAID array is slowed, the user service is influenced, and the user experience is reduced.
Disclosure of Invention
The application aims to provide a node updating method of a RAID card, a node updating system of the RAID card, a computer readable storage medium and a storage device, which can improve the updating efficiency of a RAID array.
In order to solve the above technical problem, the present application provides a node updating method for a RAID card, and the specific technical scheme is as follows:
when a node updating instruction is detected, determining the updating type of the node updating instruction;
if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from a global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction;
and if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node linked list.
Optionally, before detecting the node update instruction, the method further includes:
acquiring user command parameters;
determining the mapping relation between at least two blocks and a volume;
generating a lookup table according to the mapping relation and storing the lookup table in a cache node; and the lookup table is used for maintaining the mapping relation between the logical address of the volume and the physical address in the RAID card.
Optionally, the cache node includes a cache node ID, the lookup table, a pointer to a cache region, a pointer to a previous cache node, and a pointer to a next cache node.
Optionally, the method further includes:
acquiring a RAID array creating command;
generating the metadata of the bidirectional linked list according to the RAID array creating command;
and generating a global idle cache node linked list according to the RAID array establishing command.
Optionally, after generating the doubly-linked list metadata and the global idle buffer node linked list according to the RAID array creation command, the method further includes:
and storing the mapping relation between the volume and the block in a lookup table of the corresponding cache node.
Optionally, the obtaining the RAID array creation command includes:
and acquiring a RAID array creation command issued by the host by using the RAID card controller.
Optionally, after the idle cache node is inserted into the specified location corresponding to the capacity expansion instruction, the method further includes:
and modifying the pointer information in the cache node corresponding to the specified position.
Optionally, modifying the pointer information in the cache node corresponding to the specified location includes:
and the front pointer to be inserted into the cache node points to the cache node before the specified position, and the back pointer to be inserted into the cache node points to the cache node after the specified position.
Optionally, when modifying the pointer information in the cache node corresponding to the specified location, the method further includes:
and modifying the pointer information of the previous cache node and the next cache node of the specified position.
Optionally, after deleting the target cache node corresponding to the capacity reduction instruction from the metadata of the doubly linked list, the method further includes:
and modifying pointer information in the cache nodes before and after the target cache node.
Optionally, modifying pointer information in the front and rear cache nodes of the target cache node includes:
and pointing the back pointer of the previous cache node of the target cache node to the next cache node of the target cache node, and pointing the front pointer of the next cache node of the target cache node to the previous cache node of the target cache node.
Optionally, the generating the doubly linked list metadata according to the RAID array creation command includes:
analyzing the RAID array establishing command and confirming the mapping relation between the volume and the blocks;
and creating the doubly linked list metadata according to the mapping relation of the volumes and the blocks.
Optionally, after creating the doubly linked list metadata according to the mapping relationship between the volume and the partition, the method further includes:
and storing the metadata of the bidirectional linked list in a lookup table of the cache node.
Optionally, the generating a global idle cache node linked list according to the RAID array creation command includes:
and generating a global idle cache node linked list by using a RAID card controller according to the RAID array creation command.
Optionally, if the node update instruction is a capacity expansion instruction, applying for an idle cache node from the global idle cache node linked list includes:
and if the node updating instruction is an expansion instruction, determining the number of nodes corresponding to the expansion node, and applying for idle cache nodes meeting the number of the nodes from a global idle cache node linked list.
Optionally, if the node update instruction is a capacity expansion instruction, applying for an idle cache node from the global idle cache node linked list includes:
and if the node updating instruction is a capacity expansion instruction, determining a node parameter corresponding to the capacity expansion node, and applying for an idle cache node meeting the node parameter from a global idle cache node linked list.
Optionally, if the node update instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the doubly linked list metadata includes:
if the node updating instruction is a capacity reduction instruction, determining a target node position of a target cache node corresponding to the instruction;
and deleting the target cache node corresponding to the target node position in the doubly linked list metadata.
The present application further provides a node update system for a RAID card, including:
the type detection module is used for determining the update type of the node update instruction when the node update instruction is deliberately detected;
the capacity expansion module is used for applying for an idle cache node from a global idle cache node linked list and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction if the node update instruction is the capacity expansion instruction;
and the capacity reduction module is used for deleting the target cache node corresponding to the capacity reduction instruction from the metadata of the bidirectional linked list if the node updating instruction is the capacity reduction instruction, and releasing the deleted target cache node back to the global idle cache node linked list.
Optionally, the method further includes:
the lookup table generating module is used for acquiring user command parameters; determining the mapping relation between at least two blocks and a volume; generating a lookup table according to the mapping relation and storing the lookup table in a cache node; the lookup table is used for maintaining the mapping relation between the logical addresses of the volumes and the physical addresses in the RAID cards.
Optionally, the cache node includes a cache node ID, the lookup table, a pointer to a cache region, a pointer to a previous cache node, and a pointer to a next cache node.
Optionally, the method further includes:
the RAID control module is used for acquiring a RAID array creating command; generating the bi-directional linked list metadata according to the RAID array creation command; and generating a global idle cache node linked list according to the RAID array establishing command.
Optionally, the method further includes:
and the storage module is used for storing the mapping relation between the volume and the blocks in the lookup table of the corresponding cache node.
Optionally, the RAID control module includes:
and the command acquisition unit is used for acquiring the RAID array creation command issued by the host by using the RAID card controller.
Optionally, the method further includes:
and the pointer modification module is used for modifying the pointer information in the cache node corresponding to the specified position.
Optionally, the pointer modifying module is a module configured to point a front pointer to be inserted into a cache node to a previous cache node at the specified location, and point a back pointer to be inserted into the cache node to a next cache node at the specified location.
Optionally, the method further includes:
and the second pointer modification module is used for modifying the pointer information of the previous cache node and the next cache node at the specified position.
Optionally, the method further includes:
and the third pointer modification module is used for modifying the pointer information in the front and rear cache nodes of the target cache node.
Optionally, the pointer modifying module is a module configured to point a back pointer of a previous cache node of the target cache node to a next cache node of the target cache node, and point a front pointer of a next cache node of the target cache node to a previous cache node of the target cache node.
Optionally, the RAID control module includes:
the bidirectional linked list creating unit is used for analyzing the RAID array creating command and confirming the mapping relation between the volume and the blocks; and creating the doubly linked list metadata according to the mapping relation of the volumes and the blocks.
Optionally, the method further includes:
and the bidirectional linked list storage unit is used for storing the metadata of the bidirectional linked list in a lookup table of the cache node.
Optionally, the RAID control module includes:
and the global idle cache node linked list creating unit is used for generating a global idle cache node linked list according to the RAID array creating command by utilizing the RAID card controller.
Optionally, the capacity expansion module is a module configured to determine the number of nodes corresponding to the capacity expansion node if the node update instruction is a capacity expansion instruction, and apply for an idle cache node that satisfies the number of nodes from a global idle cache node linked list.
Optionally, the capacity expansion module is a module configured to determine a node parameter corresponding to the capacity expansion node if the node update instruction is a capacity expansion instruction, and apply for an idle cache node corresponding to the node parameter from a global idle cache node linked list.
Optionally, the capacity reduction module is configured to determine a target node position of a target cache node corresponding to the instruction if the node update instruction is a capacity reduction instruction; and deleting the target cache node corresponding to the target node position in the doubly linked list metadata.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as set forth above.
The present application further provides a storage device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when calling the computer program in the memory.
The application provides a node updating method of a RAID card, which comprises the following steps: when a node updating instruction is detected, determining the updating type of the node updating instruction; if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from a global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction; and if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node linked list.
According to the method and the device, the cache nodes are managed by using a two-way linked list metadata organization mode, a large amount of mobile data is not needed when the cache nodes are inserted or deleted, the function of simplifying the algorithm is achieved, the utilization rate of CPU resources is greatly reduced, and meanwhile the online capacity expansion and online capacity contraction rate of the RAID array can be greatly improved. In addition, the cache performance of the RAID card can be improved, so that the inconsistent risk probability of stripe stripes in the RAID array is effectively reduced. The method and the device are not only suitable for the online capacity expansion and the online capacity contraction of the RAID card, but also suitable for the soft RAID storage technology.
The present application further provides a node updating system of a RAID card, a computer-readable storage medium, and a storage device, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a cache node provided in the present application;
FIG. 2 is a schematic diagram illustrating a method for managing cache nodes using one-dimensional linear table metadata according to the present application;
fig. 3 is a flowchart of a node updating method for a RAID card according to an embodiment of the present application;
fig. 4 is a schematic diagram of an online capacity expansion cache node of a RAID array according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a node update system of a RAID card according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a storage device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating management of cache nodes by using one-dimensional linear table metadata, and in fig. 1, a cache node [100 ] indicates a one-dimensional linear table metadata organization manner.
At present, a RAID card controller in the prior art generates a cache node for managing cache when creating a RAID array, and manages the cache node by using a one-dimensional linear table metadata organization method. As shown in FIG. 1, the RAID card controller creates a RAID5 array consisting of 4 member disks, and the volume to RAID array mapping maintained by the cache nodes is shown by the arrows in FIG. 1. It should be noted that at least two partition strips in a stripe strip (201 indicates stripe 0 in fig. 1) are located on different physical disks, when a RAID array is created, a mapping relationship between the at least two partition strips and a volume is determined according to a command parameter input by a user, and a lookup table is generated by the mapping relationship and stored in a cache node, where the lookup table actually maintains a mapping relationship between a host I/O request LBA address and a storage medium PBA address in the RAID array, and the host I/O request LBA address is an LBA address of the volume. When the write strategy is a WB strategy, a cache module in the RAID card controller temporarily stores write I/O data in a cache, and immediately sends a data write completion signal to the host, and the write I/O data in the cache is written into each disk in the RAID array by multiple threads in the thread pool concurrently.
Wherein, each cache node has its own cache node ID field to play the identification role. A pointer to a cache region is maintained in the cache node, which points to a specific region where write I/O data needs to be temporarily stored in the cache. When the RAID array online capacity expansion or online capacity reduction business logic is executed, the mapping relation maintained by the lookup table fields in the cache nodes is changed. Referring to fig. 2, the one-dimensional linear table metadata indicated by 100 in fig. 2 also requires that cache nodes [3], [4], and [5] are moved backward by one cache node, i.e. the three cache nodes are sequentially written into adjacent locations, and then cache node [6] is written into the location indicated by 105 in fig. 2. In conclusion, it can be observed that, the cache nodes are managed by using the one-dimensional linear table metadata organization mode, which not only consumes a large amount of CPU resources, but also reduces the cache performance of the RAID card, so that the RAID array online capacity expansion and online capacity reduction process is slowed down, and the user experience is reduced. Meanwhile, if the user selects the write I/O data policy as the WB policy and does not select the WT policy in order to reduce the response delay to the host, when the RAID card needs to process a large number of host I/O requests, the inconsistency risk probability of stripe stripes in the RAID array will be finally greatly increased due to the above-mentioned low caching performance of the RAID card.
To solve the above technical problem, please refer to fig. 3, where fig. 3 is a flowchart of a node updating method for a RAID card according to an embodiment of the present application, where the method includes:
s101: when a node updating instruction is detected, determining the updating type of the node updating instruction;
s102: if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from a global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction;
s103: and if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node linked list.
The method for detecting the node update instruction is not limited, and the node update instruction can be automatically generated when the node update requirement exists, or the node update instruction can be issued by a user through a host. Meanwhile, the specific content of the node update instruction is not limited, and the specific content should depend on the update type of the node update instruction. The update type of the node update instruction at least includes a capacity expansion instruction and a capacity reduction instruction, i.e., increasing cache nodes or decreasing cache nodes.
The following description will be made for the capacity expansion instruction and the capacity reduction instruction respectively:
and when the node updating instruction is a capacity expansion instruction, applying for an idle cache node from the global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction.
And when the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the doubly linked list, and releasing the deleted target cache node back to the global idle cache node.
The embodiment defaults that before the process is executed, a global idle cache node linked list needs to be generated first. There is no limitation on how the global free buffer node list is generated. One possible approach may include the steps of:
firstly, acquiring a RAID array establishing command;
secondly, generating the metadata of the bidirectional linked list according to the RAID array creating command;
and thirdly, generating a global idle cache node linked list according to the RAID array establishing command.
When the doubly linked list metadata is generated, the RAID array creation command can be analyzed, the mapping relation between the volume and the blocks is confirmed, and the doubly linked list metadata is created according to the mapping relation between the volume and the blocks. The doubly linked list metadata may then be stored in a lookup table of the caching node.
In other embodiments, the bi-directional linked list metadata and the global idle buffer node linked list may not have a predetermined generation order, and may be generated sequentially or synchronously. During creation, a RAID card controller may be used to generate a global idle cache node linked list according to a RAID array creation command. Similarly, doubly linked list metadata may also be generated using a RAID card controller.
In addition, the cache node maintains the mapping relationship between the logical addresses of the volumes and the physical addresses in the RAID cards, that is, a lookup table, and the lookup table may be generated according to the user command parameter. The cache nodes in this embodiment may include a cache node ID, a lookup table, a pointer to a cache region, a pointer to a previous cache node, and a pointer to a next cache node.
The pointer to the next cache node points to the next cache node in the doubly linked list, which may also be referred to as a backpointer. Similarly, the pointer pointing to the previous cache node points to the previous cache node in the doubly linked list, which may also be referred to as a previous pointer. Therefore, when the member disks are expanded, for example, when a RAID5 array formed by 4 member disks is expanded into 5 member disks on line, a large number of mobile cache nodes are not needed, and only the cache nodes to be inserted are inserted into the designated positions. After the idle cache node is inserted into the designated location corresponding to the capacity expansion instruction, pointer information in the cache node corresponding to the designated location needs to be modified. Namely, the front pointer to be inserted into the cache node points to the previous cache node at the appointed position, and the back pointer to be inserted into the cache node points to the next cache node at the appointed position. Similarly, the pointer information of the previous and subsequent cache nodes also needs to be modified, that is, the pointer information of the previous and subsequent cache nodes at the specified position is modified respectively. Specifically, the back pointer of the previous cache node of the target cache node may point to the next cache node of the target cache node, and the front pointer of the next cache node of the target cache node may point to the previous cache node of the target cache node.
The RAID card maintains a global idle cache node linked list, when cache nodes need to be inserted during online capacity expansion of the RAID array, idle cache nodes are applied to the global idle cache node linked list, and similarly, when the RAID array needs to be deleted during online capacity reduction, the deleted cache nodes are released back to the global idle cache node linked list.
Specifically, during capacity expansion, the number of nodes corresponding to the capacity expansion nodes may be determined first, and idle cache nodes satisfying the number of nodes may be applied from the global idle cache node chain table. And determining node parameters corresponding to the capacity expansion nodes, and applying for the idle cache nodes meeting the node parameters from the global idle cache node linked list.
Similarly, if the node updating instruction is a capacity reduction instruction, the target node position of the target cache node corresponding to the instruction is determined, and therefore the target cache node corresponding to the target node position is deleted in the metadata of the doubly linked list. At this time, the deleted target node may be released back to the global free cache node linked list, so that subsequent expansion is continued to be applied.
According to the method and the device, the cache nodes are managed in a metadata organization mode of the bidirectional linked list, a large amount of mobile data is not needed when the cache nodes are inserted or deleted, the function of simplifying an algorithm is achieved, the CPU resource utilization rate is greatly reduced, and meanwhile the online capacity expansion and online capacity reduction rate of the RAID array can be greatly improved. In addition, the cache performance of the RAID card can be improved, so that the inconsistent risk probability of the stripe in the RAID array is effectively reduced. The method and the device are not only suitable for the online capacity expansion and the online capacity reduction of the RAID card, but also suitable for the soft RAID storage technology.
Referring to fig. 4, fig. 4 is a schematic diagram of a RAID array online capacity expansion cache node according to an embodiment of the present application, where indicated at 200 in fig. 4 is a lookup table, that is, a lookup _ table field, used to maintain a mapping relationship from a volume to a strip partition in a RAID array. The data cache owner indicated by 201, corresponding to the cache _ ptr field, points to a specific area where the write I/O data needs to be temporarily stored in the cache. The pre-pointer and the post-pointer, indicated at 202, described above, may correspond to the pre _ pointer field and the next _ pointer field.
As can be seen from FIG. 4, in the online expansion process of the RAID array, the cache node [3], the cache node [4] and the cache node [5] do not need to sequentially write back to adjacent positions, that is, a large amount of moving data is not needed. Instead, two cache nodes, namely, the cache node [6] and the cache node [7] in fig. 6, are applied from the global free cache node chain table, the back pointer of the cache node [2] is operated to point to the cache node [6], the front pointer of the cache node [3] is operated to point to the cache node [6], the front pointer of the cache node [6] is operated to point to the cache node [2], and the back pointer of the cache node [6] is operated to point to the cache node [3]. Therefore, the method for managing the cache nodes by using the metadata organization mode of the doubly linked list does not need to move a large amount of data, simplifies the algorithm flow and greatly reduces the utilization rate of CUP (compute unified protection protocol) by applying the pointers. In addition, when the RAID card executes on-line capacity expansion and on-line capacity reduction business logic, the method provided by the application can improve the cache performance of the RAID card, thereby effectively reducing the inconsistent risk probability of the strips in the RAID array.
On the basis of the above, a specific implementation procedure of the present application may be as follows:
the first step is as follows: and the RAID card controller analyzes a command for creating the RAID array issued by the user.
The second step is that: the RAID card controller generates doubly linked list metadata and a global idle cache node linked list.
The third step: and the RAID card controller stores the generated mapping relation between the volume and the strip block in a lookup table of a cache node managed by a doubly linked list metadata organization mode.
The fourth step: and when the node updates the instruction, determining the update type of the node update instruction.
The fifth step: if online capacity expansion is carried out, the RAID card controller generates a mapping relation from a new volume to strip partition, and stores the mapping relation into a lookup table of a cache node.
And a sixth step: and applying for idle cache nodes from a global idle cache node linked list maintained by the RAID card.
The seventh step: and inserting the idle cache node into the specified position of the cache node managed by the metadata organization mode of the doubly linked list.
In the following, a node updating system of a RAID card provided in an embodiment of the present application is introduced, and the node updating system of a RAID card described below and the node updating method of a RAID card described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a node update system of a RAID card according to an embodiment of the present application, and the present application further provides a node update system of a RAID card, including:
the type detection module is used for determining the update type of the node update instruction when the node update instruction is deliberately detected;
the capacity expansion module is used for applying for an idle cache node from a global idle cache node linked list and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction if the node update instruction is the capacity expansion instruction;
and the capacity reduction module is used for deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list if the node updating instruction is the capacity reduction instruction, and releasing the deleted target cache node back to the global idle cache node linked list.
According to the embodiment of the application, the cache nodes are managed in a metadata organization mode by using the two-way linked list through the application type detection module, the capacity expansion module and the capacity reduction module, a large amount of mobile data is not needed when the cache nodes are inserted or deleted, the algorithm is simplified, the utilization rate of CPU resources is greatly reduced, and meanwhile, the online capacity expansion and online capacity reduction rate of the RAID array can be greatly improved.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the lookup table generating module is used for acquiring user command parameters; determining the mapping relation between at least two blocks and a volume; generating a lookup table according to the mapping relation and storing the lookup table in a cache node; and the lookup table is used for maintaining the mapping relation between the logical address of the volume and the physical address in the RAID card.
Based on the foregoing embodiment, as a preferred embodiment, the cache node includes a cache node ID, the lookup table, a pointer to a cache region, a pointer to a previous cache node, and a pointer to a next cache node.
Based on the above embodiment, as a preferred embodiment, the method further includes:
the RAID control module is used for acquiring a RAID array creating command; generating the metadata of the bidirectional linked list according to the RAID array creating command; and generating a global idle cache node linked list according to the RAID array creating command.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the storage module is used for storing the mapping relation between the volume and the blocks in the lookup table of the corresponding cache node.
Based on the above embodiment, as a preferred embodiment, the RAID control module includes:
and the command acquisition unit is used for acquiring the RAID array creation command issued by the host by using the RAID card controller.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the pointer modification module is used for modifying the pointer information in the cache node corresponding to the specified position.
Based on the foregoing embodiment, as a preferred embodiment, the pointer modification module is a module configured to point a front pointer to be inserted into a cache node to a previous cache node at the specified location, and point a back pointer to be inserted into the cache node to a next cache node at the specified location.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the second pointer modification module is used for modifying the pointer information of the previous cache node and the next cache node at the specified position.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the third pointer modification module is used for modifying the pointer information in the cache nodes before and after the target cache node.
Based on the foregoing embodiment, as a preferred embodiment, the pointer modification module is a module configured to point a back pointer of a previous cache node of the target cache node to a next cache node of the target cache node, and point a front pointer of the next cache node of the target cache node to the previous cache node of the target cache node.
Based on the above embodiment, as a preferred embodiment, the RAID control module includes:
the bidirectional linked list creating unit is used for analyzing the RAID array creating command and confirming the mapping relation between the volume and the blocks; and creating the metadata of the doubly linked list according to the mapping relation between the volumes and the blocks.
Based on the above embodiment, as a preferred embodiment, the method further includes:
and the doubly linked list storage unit is used for storing the doubly linked list metadata in a lookup table of the cache node.
Based on the above embodiment, as a preferred embodiment, the RAID control module includes:
and the global idle cache node linked list creating unit is used for generating a global idle cache node linked list according to the RAID array creating command by utilizing the RAID card controller.
Based on the foregoing embodiment, as a preferred embodiment, the capacity expansion module is a module configured to determine the number of nodes corresponding to the capacity expansion node if the node update instruction is a capacity expansion instruction, and apply for an idle cache node that satisfies the number of nodes from a global idle cache node linked list.
Based on the foregoing embodiment, as a preferred embodiment, the capacity expansion module is a module configured to determine a node parameter corresponding to the capacity expansion node if the node update instruction is a capacity expansion instruction, and apply for an idle cache node that meets the node parameter from a global idle cache node linked list.
Based on the foregoing embodiment, as a preferred embodiment, the capacity reduction module is configured to determine, if the node update instruction is a capacity reduction instruction, a target node position of a target cache node corresponding to the instruction; and deleting the target cache node corresponding to the target node position in the doubly linked list metadata.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed, may implement the steps provided by the above-described embodiments. The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present application further provides a storage device, which may include a memory and a processor, where the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the method provided in the foregoing embodiment may be implemented. Of course, the storage device may also include various network interfaces, power supplies, and the like. Referring to fig. 6, fig. 6 is a schematic structural diagram of a storage device according to an embodiment of the present disclosure, where the storage device according to the embodiment may include: a processor 2101 and a memory 2102.
Optionally, the storage device may also include a communications interface 2103, an input unit 2104, and a display 2105 and a communications bus 2106.
The processor 2101, the memory 2102, the communication interface 2103, the input unit 2104, the display 2105 all communicate with each other via the communication bus 2106.
In the embodiment of the present application, the processor 2101 may be a Central Processing Unit (CPU), an application specific integrated circuit (asic), a digital signal processor, an off-the-shelf programmable gate array (fpga) or other programmable logic device.
The processor may call a program stored in the memory 2102. In particular, the processor may perform the operations performed by the memory device in the above embodiments.
The memory 2102 stores one or more programs, which may include program code including computer operating instructions, and in this embodiment, at least one program for implementing the following functions is stored in the memory:
when a node updating instruction is detected, determining the updating type of the node updating instruction;
if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from a global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction;
and if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node linked list.
In one possible implementation, the memory 2102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the computer.
Further, the memory 2102 may include high speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid state storage device.
The communication interface 2103 may be an interface to a communication module, such as an interface to a GSM module.
The present application may also include a display 2105 and an input unit 2104, among others.
The structure of the storage device shown in fig. 6 does not constitute a limitation of the storage device in the embodiments of the present application, and in practical applications, the storage device may include more or less components than those shown in fig. 6, or some components may be combined.
The embodiments are described in a progressive mode in the specification, the emphasis of each embodiment is on the difference from the other embodiments, and the same and similar parts among the embodiments can be referred to each other. For the system provided by the embodiment, the description is relatively simple because the system corresponds to the method provided by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (19)

1. A node updating method of a RAID card is characterized by comprising the following steps:
when a node updating instruction is detected, determining the updating type of the node updating instruction;
if the node updating instruction is a capacity expansion instruction, applying for an idle cache node from a global idle cache node linked list, and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction;
if the node updating instruction is a capacity reduction instruction, deleting a target cache node corresponding to the capacity reduction instruction in the metadata of the bidirectional linked list, and releasing the deleted target cache node back to the global idle cache node linked list;
before detecting the node update instruction, the method further includes:
acquiring user command parameters;
determining the mapping relation between at least two blocks and a volume;
generating a lookup table according to the mapping relation; and the lookup table is used for maintaining the mapping relation between the logical address of the volume and the physical address in the RAID card.
2. The node updating method according to claim 1, wherein the cache node comprises a cache node ID, the lookup table, a pointer to a cache region, a pointer to a previous cache node, and a pointer to a next cache node.
3. The node updating method according to claim 1, further comprising:
acquiring a RAID array creating command;
generating the metadata of the bidirectional linked list according to the RAID array creating command;
and generating a global idle cache node linked list according to the RAID array creating command.
4. The node update method of claim 3, wherein after generating the doubly linked list metadata and the global free cache node linked list according to the RAID array create command, further comprising:
and storing the mapping relation of the volume and the blocks in a lookup table of the corresponding cache node.
5. The node update method of claim 3, wherein obtaining a RAID array creation command comprises:
and obtaining a RAID array creation command issued by the host by using the RAID card controller.
6. The node update method according to claim 2, wherein after the idle cache node is inserted into the designated location corresponding to the capacity expansion instruction, the method further comprises:
and modifying the pointer information in the cache node corresponding to the specified position.
7. The node update method of claim 6, wherein modifying pointer information in the cache node corresponding to the specified location comprises:
and the front pointer to be inserted into the cache node points to the previous cache node of the specified position, and the back pointer to be inserted into the cache node points to the next cache node of the specified position.
8. The node updating method according to claim 1, wherein modifying pointer information in the cache node corresponding to the specified location further comprises:
and modifying the pointer information of the previous cache node and the next cache node of the specified position.
9. The node updating method according to claim 3, wherein after deleting the target cache node corresponding to the capacity reduction instruction in the doubly linked list metadata, further comprising:
and modifying pointer information in the cache nodes before and after the target cache node.
10. The node update method of claim 9, wherein modifying pointer information in cache nodes before and after the target cache node comprises:
and pointing a back pointer of a cache node before the target cache node to a cache node after the target cache node, and pointing a front pointer of a cache node after the target cache node to a cache node before the target cache node.
11. The node update method of claim 3, wherein generating the doubly linked list metadata from the RAID array create command comprises:
analyzing the RAID array establishing command, and confirming the mapping relation between the volume and the blocks;
and creating the metadata of the doubly linked list according to the mapping relation between the volumes and the blocks.
12. The node updating method of claim 11, wherein after creating doubly linked list metadata from the mapping of volumes and blocks, further comprising:
and storing the metadata of the bidirectional linked list in a lookup table of the cache node.
13. The node update method of claim 3, wherein generating a global free cache node linked list according to the RAID array create command comprises:
and generating a global idle cache node linked list by using a RAID card controller according to the RAID array creation command.
14. The node update method of claim 1, wherein applying for an idle cache node from a global idle cache node linked list if the node update instruction is a capacity expansion instruction comprises:
and if the node updating instruction is a capacity expansion instruction, determining the number of nodes corresponding to the capacity expansion node, and applying for idle cache nodes meeting the number of the nodes from a global idle cache node linked list.
15. The node update method of claim 1, wherein applying for an idle cache node from a global idle cache node linked list if the node update instruction is a capacity expansion instruction comprises:
and if the node updating instruction is a capacity expansion instruction, determining a node parameter corresponding to the capacity expansion node, and applying for an idle cache node meeting the node parameter from a global idle cache node linked list.
16. The node updating method according to claim 1, wherein if the node updating instruction is a capacity reduction instruction, deleting the target cache node corresponding to the capacity reduction instruction from the doubly linked list metadata comprises:
if the node updating instruction is a capacity reduction instruction, determining a target node position of a target cache node corresponding to the instruction;
and deleting the target cache node corresponding to the target node position in the doubly linked list metadata.
17. A node update system of a RAID card, characterized by comprising:
the type detection module is used for determining the update type of the node update instruction when the node update instruction is deliberately detected;
the capacity expansion module is used for applying for an idle cache node from a global idle cache node linked list and inserting the idle cache node to a specified position corresponding to the capacity expansion instruction if the node update instruction is the capacity expansion instruction;
the capacity reduction module is used for deleting a target cache node corresponding to the capacity reduction instruction from the metadata of the bidirectional linked list if the node updating instruction is the capacity reduction instruction, and releasing the deleted target cache node back to the global idle cache node linked list;
the lookup table generating module is used for acquiring user command parameters; determining the mapping relation between at least two blocks and a volume; generating a lookup table according to the mapping relation and storing the lookup table in a cache node; and the lookup table is used for maintaining the mapping relation between the logical address of the volume and the physical address in the RAID card.
18. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a node updating method for a RAID card according to any one of claims 1 to 16.
19. A storage device comprising a memory in which a computer program is stored and a processor which, when calling the computer program in the memory, carries out the steps of the node update method for a RAID card according to any one of claims 1 to 16.
CN202211554112.2A 2022-12-06 2022-12-06 Node updating method, system and related device of RAID card Active CN115576501B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211554112.2A CN115576501B (en) 2022-12-06 2022-12-06 Node updating method, system and related device of RAID card
PCT/CN2023/101696 WO2024119775A1 (en) 2022-12-06 2023-06-21 Raid card node updating method and system, and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211554112.2A CN115576501B (en) 2022-12-06 2022-12-06 Node updating method, system and related device of RAID card

Publications (2)

Publication Number Publication Date
CN115576501A CN115576501A (en) 2023-01-06
CN115576501B true CN115576501B (en) 2023-03-10

Family

ID=84590691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211554112.2A Active CN115576501B (en) 2022-12-06 2022-12-06 Node updating method, system and related device of RAID card

Country Status (2)

Country Link
CN (1) CN115576501B (en)
WO (1) WO2024119775A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115904255B (en) * 2023-01-19 2023-05-16 苏州浪潮智能科技有限公司 Data request method, device, equipment and storage medium
CN115934000B (en) * 2023-03-07 2023-06-09 苏州浪潮智能科技有限公司 Timing method and related device of storage system
CN117278505B (en) * 2023-11-21 2024-02-09 苏州元脑智能科技有限公司 Message transmission method, system, equipment and medium between RAID card nodes

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095261A (en) * 2014-05-08 2015-11-25 北京奇虎科技有限公司 Data insertion method and device
CN110058953B (en) * 2018-01-18 2023-02-28 伊姆西Ip控股有限责任公司 Method, apparatus, and storage medium for changing type of storage system
CN109101438B (en) * 2018-07-25 2020-07-28 百度在线网络技术(北京)有限公司 Method and apparatus for storing data
CN110908927A (en) * 2018-09-14 2020-03-24 慧荣科技股份有限公司 Data storage device and method for deleting name space thereof
US11494103B2 (en) * 2019-08-02 2022-11-08 EMC IP Holding Company LLC Memory-efficient processing of RAID metadata bitmaps
CN113448971A (en) * 2020-03-24 2021-09-28 北京字节跳动网络技术有限公司 Data updating method based on distributed system, computing node and storage medium
CN111464355B (en) * 2020-03-31 2022-11-15 北京金山云网络技术有限公司 Method and device for controlling expansion and contraction capacity of Kubernets container cluster and network equipment
CN114610652A (en) * 2022-03-25 2022-06-10 南京信息工程大学 SD card data access method based on bidirectional linked list

Also Published As

Publication number Publication date
WO2024119775A1 (en) 2024-06-13
CN115576501A (en) 2023-01-06

Similar Documents

Publication Publication Date Title
CN115576501B (en) Node updating method, system and related device of RAID card
US11243701B2 (en) Data write method and solid-state drive array
US8805902B2 (en) Managing snapshot storage pools
US8266365B2 (en) Ruggedized memory device
CN110018998B (en) File management method and system, electronic equipment and storage medium
US8356148B2 (en) Snapshot metadata management in a storage system
US9311002B1 (en) Systems, methods, and computer readable media for compressing data at a virtually provisioned storage entity
CN103064797B (en) Data processing method and virtual machine management platform
CN112947856B (en) Memory data management method and device, computer equipment and storage medium
EP3352071B1 (en) Data check method and storage system
CN113568582B (en) Data management method, device and storage equipment
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
CN115455058A (en) Cache data processing method and device, computer equipment and storage medium
CN104408126B (en) A kind of persistence wiring method of database, device and system
CN108829345B (en) Data processing method of log file and terminal equipment
CN108132759B (en) Method and device for managing data in file system
CN109063210A (en) Resource object querying method, device, equipment and the storage medium of storage system
WO2024108939A1 (en) Multi-level mapping framework and data operation request processing method and system
CN114936010B (en) Data processing method, device, equipment and medium
CN108052294B (en) Modification writing method and modification writing system of distributed storage system
CN110795031A (en) Data deduplication method, device and system based on full flash storage
CN115964002A (en) Electric energy meter terminal file management method, device, equipment and medium
CN112114757B (en) Storage method and system in object storage system, computing device and medium
CN109284237B (en) Garbage recovery method and system in full flash memory array
CN110658999A (en) Information updating method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant