Data access method and device, nonvolatile storage medium and electronic equipment

By receiving access instructions and determining the data access strategy based on the storage system status, automatic data migration is achieved, and the problem of low data access efficiency in the prior art is solved, improving the efficiency of data access and the simplification of user operations.

CN120196793APending Publication Date: 2025-06-24云和恩墨(北京)信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510273103.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

Data access related to placement groups in the prior art relies on complex user operations, resulting in inefficient data access.

Method used

By receiving access instructions, the status of the storage system is determined based on the relevant information of the target placement group, and the data access policy is determined based on the status, and the policy is used to realize data access, thereby automatically triggering data migration and reducing user operations participation.

Benefits of technology

Improve the efficiency of data access, reduce the degree of participation of user operations in data access related to placement group, and simplify user operations during placement group splitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196793A_ABST
    Figure CN120196793A_ABST
Patent Text Reader

Abstract

The invention discloses a data access method and device, a nonvolatile storage medium and electronic equipment. The method comprises the steps that an access instruction is received, the access instruction is used for indicating to access data from a target placement group, and the target placement group is a logic storage unit used for managing data distribution in the storage system; the state of the storage system at the target moment is determined according to the related information of the target placement group, and the state comprises that splitting is completed during splitting; a data access strategy is determined according to the state of the storage system at the target moment, and the data access strategy is used for indicating an object of data access operation; and realizing data access by adopting a data access strategy. According to the method and the device, the technical problem of low data access efficiency caused by the fact that data access related to the placement group depends on complex user operation in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a method and apparatus for data access, a non-volatile storage medium, and an electronic device. Background Art

[0002] A placement group (PG) is the basic unit for data distribution and replication in a distributed storage system. PG splitting is triggered by a user, and by splitting to expand the number of PGs, the data load on a single PG can be reduced. In related technologies, the method for PG splitting relies on complex user operations. Therefore, data access related to PGs is also realized with the participation of complex user operations, resulting in low data access efficiency.

[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0004] Embodiments of this application provide a method and apparatus for data access, a non-volatile storage medium, and an electronic device, so as to at least solve the technical problem of low data access efficiency caused by the fact that in related technologies, data access related to PGs depends on complex user operations for implementation.

[0005] According to one aspect of the embodiments of this application, a method for data access is provided, including: receiving an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit for managing data distribution in a storage system; determining the state of the storage system at a target time according to relevant information of the target placement group, where the state includes: in the process of splitting, split completed; determining a data access policy according to the state of the storage system at the target time, where the data access policy is used to indicate the object of a data access operation; and implementing data access by using the data access policy.

[0006] Optionally, determining the state of the storage system at the target time according to relevant information of the target placement group includes: obtaining relevant information of the target placement group, where the relevant information at least includes metadata of the target placement group; and determining the state of the storage system at the target time according to the metadata.

[0007] Optionally, determining the state of the storage system at the target time according to the metadata includes: when the metadata contains placement group identification information, determining that the state of the storage system is in the process of splitting, where each placement group identification information is used to uniquely identify each placement group; and when the metadata does not contain placement group identification information, determining that the state of the storage system is split completed.

[0008] Optionally, determine a data access policy according to the state of the storage system at the target moment, including: when the state of the storage system at the target moment is in the process of splitting, determine that the data access policy is the first policy, where the first policy indicates that the object of the data access operation is other placement groups associated with the target placement group; when the state of the storage system at the target moment is splitting completed, determine that the data access policy is the second policy, where the second policy indicates that the object of the data access is the target placement group.

[0009] Optionally, implement data access using the data access policy, including: when the data access policy is the first policy, obtain an index table, where the index table is used to record the association relationships between multiple placement groups; query the target placement group in the index table, and determine the parent placement group associated with the target placement group in the index table, where the target placement group is generated by splitting the parent placement group; perform a data access operation on the parent placement group.

[0010] Optionally, the index table is generated by the following method: it is generated when performing a splitting process on the storage system, where performing a splitting process on the storage system includes: receiving a storage pool name, where the storage pool name is used to indicate the logical storage unit to be split; filling the storage pool name into a splitting instruction template to obtain a target splitting instruction; under the trigger of the target splitting instruction, perform a splitting process on the logical storage unit to be split to obtain an index table.

[0011] Optionally, performing a splitting process on the logical storage unit to be split to obtain an index table includes: performing a splitting process on the logical storage unit to be split to obtain multiple sub-placement groups; establishing an index table according to the relationship between the multiple sub-placement groups and multiple original placement groups, where the original placement group is the parent placement group.

[0012] According to another aspect of the embodiments of the present application, there is also provided a data access device, including: a receiving module, configured to receive an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit in the storage system for managing data distribution; a first determination module, configured to determine the state of the storage system at the target moment according to the relevant information of the target placement group, where the state includes: splitting, splitting completed; a second determination module, configured to determine a data access policy according to the state of the storage system at the target moment, where the data access policy is used to indicate the object of the data access operation; an execution module, configured to implement data access using the data access policy.

[0013] According to another aspect of the embodiments of the present application, there is also provided a non-volatile storage medium, in which a computer program is stored, where the method for data access described above is executed by running the computer program on the device where the non-volatile storage medium is located.

[0014] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the above data access method through the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is further provided, including computer instructions. When the computer instructions are executed by a processor, the steps of the above data access method are implemented.

[0016] In the embodiments of the present application, an access instruction is received, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit for managing data distribution in a storage system; the state of the storage system at a target moment is determined according to relevant information of the target placement group, where the state includes: splitting, split completed; a data access policy is determined according to the state of the storage system at the target moment, where the data access policy is used to indicate an object of a data access operation; a data access operation is implemented by using the data access policy, and data migration is automatically triggered by determining an object of the data access operation according to the split state of the storage system, achieving the purpose of reducing the participation of user operations in data access related to placement groups, thereby achieving the technical effect of improving data access efficiency, and further solving the technical problem of low data access efficiency caused by the fact that data access related to placement groups in the related art depends on complex user operations to implement. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0018] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a data access method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of steps of a data access method according to an embodiment of the present application;

[0020] Figure 3 is a flowchart of split of a placement group (PG) according to an embodiment of the present application;

[0021] Figure 4 is a structure diagram of a data access device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0024] To better understand the embodiments of this application, the following explains the technical terms involved in the embodiments of this application as follows:

[0025] Metadata: Data about data, which is information used to describe, explain, locate, or otherwise assist in understanding and managing data.

[0026] In the related art, the method of placement group (PG) splitting relies on complex user operations. The user needs to intervene in the data migration process, and the data access operations related to the placement group are implemented during or after the placement group splitting. Therefore, the data access operations related to the placement group also rely on complex user operations to implement. In addition, in the related art, the split sub-PGs and parent PGs are distinguished by the file paths of the file system. This method limits its compatibility and application scope on non-file system back-end storage, that is, the methods related to PG splitting in the related art can only be implemented on the file system, and there are also problems of limited application scenarios and low flexibility. To solve the above problems, relevant solutions are provided in the embodiments of this application, which are described in detail below.

[0027] According to the embodiments of this application, an embodiment of a data access method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described here can be executed in a different order than here.

[0028] The method embodiments provided by the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 1 The following shows a hardware block diagram of a computer terminal for implementing a method for data access. As Figure 1 shown, the computer terminal 10 may include one or more processors 102 (shown as 102a, 102b,..., 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only illustrative and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than those Figure 1 shown, or have a different configuration from that Figure 1 shown.

[0029] It should be noted that the above one or more processors 102 and / or other data processing circuits are generally referred to as "data processing circuits" herein. The data processing circuit may be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10. As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).

[0030] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method for data access in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned method for data access. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the computer terminal 10 through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 10.

[0033] The embodiments of the present application provide a data access method that can run in the above operating environment. Figure 2 It is a step flowchart of the data access method provided by the embodiments of the present application, as Figure 2 shown, and the method includes the following steps:

[0034] Step S202, receive an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit in the storage system for managing data distribution.

[0035] The method provided by the embodiments of the present application is not limited to the type of the backend storage system, and can be applied to both file systems and non-file systems. Through the method provided by the embodiments of the present application, on the basis of reducing the participation of user operations, the continuity and efficiency of data access are improved. In step S202, the access instruction sent by the user terminal is received by the backend storage system, or the front-end interaction system dependent on the backend storage system, or other systems applying the backend storage system, where the access instruction is used to access data in a placement group of the backend storage system, and accessing data includes: reading data in the placement group and writing data into the placement group; in this embodiment, the placement group requested to be accessed by the access instruction is called the target placement group, and the identification information of the placement group included in the access instruction can be obtained by parsing the access instruction, and further the placement group indicated by the access instruction (i.e., the target placement group) can be determined according to the identification information of the placement group. The above-mentioned placement group (PG) / target placement group is a logical storage unit in the backend storage system (i.e., the storage system) for managing data distribution. Each placement group serves as an independent small storage pool. In a distributed storage architecture, data is divided into multiple objects (or data blocks), and these objects (or data blocks) are placed in different placement groups.

[0036] Step S204: Determine the state of the storage system at the target moment according to the relevant information of the target placement group, where the state includes: in the process of splitting, splitting completed.

[0037] After receiving the access instruction in step S202, after determining the target placement group indicated by the access instruction according to the identification information of the placement group carried in the access instruction, in step S204, determine the state of the storage system according to the relevant information of the target placement group. For example, it can be determined that the state of the storage system at the moment of receiving the access instruction (i.e., the target moment), or the state at the moment before starting to execute the data access operation corresponding to the access instruction (i.e., the target moment), so as to determine the data access policy executed in response to the access instruction according to the state of the storage system at the target moment. In the embodiments of the present application, the state of the storage system is divided into two types: in the process of splitting and splitting completed. Among them, in the process of splitting means that all the placement groups (PGs) obtained after the splitting of the placement group (PG) of the storage system have not reached the preset quantity and are still in the splitting process; correspondingly, splitting completed indicates that all the placement groups (PGs) obtained after the splitting of the placement group (PG) of the storage system have reached the preset quantity and the PG splitting has been completed.

[0038] According to some optional embodiments of the present application, determining the state of the storage system at the target moment according to the relevant information of the target placement group includes: obtaining the relevant information of the target placement group, where the relevant information at least includes the metadata of the target placement group; determining the state of the storage system at the target moment according to the metadata.

[0039] In this embodiment, the state of the placement group (i.e., the target placement group) indicated by the access instruction at the target moment is realized based on obtaining the relevant information of the target placement group. Specifically, in this embodiment, the relevant information of the target placement group obtained at least includes the metadata of the target placement group. Since in the method provided in the embodiments of the present application, when the splitting is not completed, the identifier of the parent PG or the splitting status mark will be added to the metadata of the sub-placement group. Therefore, in this embodiment, when receiving the access instruction, the state of the storage system can be determined by obtaining the metadata of the target placement group. In the above solution, the metadata of the target placement group includes: location description data indicating the storage location of the data in the target placement group, data describing the state of the target placement group, and other description data for describing the target placement group or the data stored in the target placement group; and the identifier of the parent placement group (PG) will only appear in the sub-placement group during the splitting process. Once the splitting is completed, the metadata of the sub-placement group no longer contains the identifier of the parent placement group (PG).

[0040] Optionally, determine the state of the storage system at the target time according to the metadata, including: when the placement group identification information is included in the metadata, determine that the state of the storage system is in the process of splitting, where each placement group identification information is used to uniquely identify each placement group; when the placement group identification information is not included in the metadata, determine that the state of the storage system is split completed.

[0041] As mentioned in the above embodiments, in the method provided in the embodiments of the present application, the state of the storage system at the target time can be determined according to the metadata of the target placement group. Specifically, when determining the state of the storage system at the target time according to the metadata of the target placement group, the method provided in this embodiment can be used, that is, distinguish the state of the storage system at the target time according to whether the metadata of the target placement group contains the identifier of the parent placement (i.e., the placement group identification information). Since the identifier of the parent placement group (PG) only appears in the child placement group during the splitting process, and each placement group identifier is used to uniquely identify a placement group, therefore, in this embodiment, if the identifier of the parent placement group (PG) (i.e., the placement group identification information) is read from the metadata of the target placement group, it is determined that the state of the storage system at the target time is in the process of splitting; on the contrary, if the metadata of the target placement group does not contain the identifier of the parent placement group (PG) (i.e., the placement group identification information), it is determined that the state of the storage system at the target time is split completed.

[0042] It should be noted that, in the method provided in the embodiments of the present application, after the splitting is completed, the metadata of the child placement group does not store its own identification information, and the metadata of the parent placement group does not store its own identification information either. Therefore, if the placement group identification information is read from the metadata of a placement group, it can be determined that this placement group is a child placement group, and the storage system to which the child placement group belongs is currently in the process of splitting.

[0043] Step S206, determine a data access policy according to the state of the storage system at the target time, where the data access policy is used to indicate the object of the data access operation.

[0044] In step S206, determine which data access policy should be executed in response to the access instruction received in step S202 according to the state of the storage system determined in step S204. Among them, in the embodiments of the present application, corresponding data access policies are set for different states of the storage system; in this embodiment, the data access policy specifically refers to the object of the data access operation, and the object of the data access operation indicates the placement group that allows reading data (or allows writing data). For example, when the data access operation corresponding to the data access instruction is to read data, the object of the data access operation indicates the placement group that allows reading data; if the data access operation corresponding to the data access instruction is to write data, the object of the data access operation indicates the placement group that allows writing data.

[0045] Optionally, determine a data access policy according to the state of the storage system at the target time, including: when the state of the storage system at the target time is in the process of splitting, determine that the data access policy is the first policy, where the first policy indicates that the object of the data access operation is other placement groups associated with the target placement group; when the state of the storage system at the target time is splitting completed, determine that the data access policy is the second policy, where the second policy indicates that the object of the data access is the target placement group.

[0046] As mentioned in the above embodiments, in the method provided by the embodiments of the present application, corresponding data access policies are respectively set for different states of the storage system at the target time. Therefore, in this embodiment, the data access policy to be executed can be determined according to the state of the storage system at the target time. Specifically, if the state of the storage system at the target time is in the process of splitting, execute the data access policy (i.e., the first policy) set in advance for this state of splitting; if the state of the storage system at the target time is splitting completed, execute the data access policy (i.e., the second policy) set in advance for this state of splitting completed; as mentioned in the above embodiments, the data access policy is used to indicate the accessed placement group (i.e., the object of the data access operation), then, of course, the accessed placement groups indicated by different data access policies are different; that is, in this embodiment, the difference between the first policy and the second policy is that the accessed placement groups they indicate are different, where the accessed placement group (i.e., the object of the data access operation) indicated by the first policy is other placement groups associated with the target placement group, and the accessed placement group (i.e., the object of the data access operation) indicated by the second policy is the target placement group.

[0047] Step S208, implement data access using the data access policy.

[0048] In step S208, implement data access in response to an access instruction using the data access policy determined in step S206.

[0049] Optionally, implementing data access using the data access policy includes: when the data access policy is the first policy, obtain an index table, where the index table is used to record the association relationships between multiple placement groups; query the target placement group in the index table, and determine the parent placement group associated with the target placement group in the index table, where the target placement group is generated by splitting the parent placement group; perform a data access operation on the parent placement group.

[0050] In the embodiments of the present application, according to different data access policies, the specific processes for implementing data access using the data access policy are also different. For example, when the data access policy is the second policy indicating a data access operation on a target placement group, the following process is executed when implementing data access using the data access policy: directly perform a data access operation on the target placement group. If the data access operation indicates reading data, read the data from the target placement group; if the data access operation indicates writing data, write the data into the target placement group. When the data access policy is the first policy indicating a data access on other placement groups associated with the target placement group, the following process is executed when implementing data access using the data access policy: obtain the index table stored in the storage system, query other placement groups associated with the target placement group in the index table, and then perform a data access operation on this other placement group associated with the target placement group. In the embodiments of the present application, the so-called other placement groups associated with the target placement group are the parent placement groups that generate the target placement group. When the storage system performs PG splitting, its original placement group serves as the parent placement group, and the parent placement group generates one or more child placement groups through splitting. Which original placement group (i.e., the parent placement group) each child placement group is generated by is recorded in the index table in the form of an association relationship, where the association relationship can be expressed in the following form: "identifier of the child placement group - identifier of the parent placement group". For example, when the storage system receives a data access request (i.e., an access instruction) during splitting, at this time, the first policy is used to implement data access. The access instruction requests access to the child PG (PG4). Since the state of the storage system is currently in the process of splitting, the first policy needs to be executed, that is, a data access operation needs to be performed on the parent PG (i.e., PG1) of the child PG (PG4). Therefore, when the access instruction sent by the user requests a data access operation on PG4, the access instruction will be forwarded to the parent PG (i.e., PG1) for a data access operation on the parent PG (i.e., PG1).

[0051] According to some optional embodiments of the present application, the index table is generated by the following method: it is generated when performing a splitting process on the storage system. Among them, performing a splitting process on the storage system includes: receiving a storage pool name, where the storage pool name is used to indicate the logical storage unit on which the splitting process is to be performed; filling the storage pool name into the splitting instruction template to obtain a target splitting instruction; and under the trigger of the target splitting instruction, performing a splitting process on the logical storage unit on which the splitting process is to be performed to obtain the index table.

[0052] The index table mentioned in the previous embodiment for recording the association relationship between the child placement group and the parent placement group is generated when the storage system performs PG splitting, Figure 3 is the flowchart of PG splitting, as Figure 3As shown, the storage system executes the split process upon receiving a split instruction output by the client (such as "zs pool pgsplit <poolname>”) After that, the above splitting instruction is composed of the storage pool name (poolname) input by the client and the splitting instruction template (zs pool pgsplit◇). That is, in this embodiment, the user only needs to input the storage pool name (poolname) to trigger the PG splitting of the logical storage unit corresponding to poolname, which reduces the complexity of user operations during PG splitting and decreases the user's participation in the PG splitting process. After the backend of the client receives the storage pool name input by the user at the front end of the client, it fills the storage pool name into the instruction template to generate a target splitting instruction indicating the PG splitting of the logical storage unit corresponding to the storage pool name. For example, if the user inputs the non-volatile storage pool name as A at the client, a target splitting instruction for indicating the PG splitting of storage pool A is generated: "zs pool pgsplit ". After receiving the split instruction, the control component (monitor) in the storage system controls the backend storage (raft / lstore) of the storage system to perform PG splitting, and generates sub-placement groups and index tables during the execution of PG splitting.

[0053] Optionally, perform a split process on the logical storage unit to be split to obtain an index table, including: performing a split process on the logical storage unit to be split to obtain multiple sub-placement groups; establishing an index table according to the relationship between the multiple sub-placement groups and multiple original placement groups, where the original placement group is the parent placement group.

[0054] Such as Figure 3 As shown, when the storage system executes the PG splitting process, according to the splitting instruction (such as "zs pool pgsplit <poolname>”) determines the logical storage unit to be split according to the storage pool name (poolname) provided therein. After the control component (monitor) in the storage system receives the split instruction, it will generate a corresponding number of new PGs, that is, sub-placement groups (sub-PGs), according to the current PG configuration and data distribution strategy of the storage pool. The number of generated sub-PGs can be specified by the user. For example, it can be twice the number of existing PGs (i.e., the original placement groups). If the number of generated sub-PGs is set to twice the number of existing PGs, when the PG split process is executed, each existing PG will be split into two sub-PGs. Therefore, the original placement group in the storage system is the parent placement group when the PG split is executed. To correctly handle the data access requests (i.e., access instructions) from the user side during the split and migration, when the PG split is not completed, the information of its corresponding parent PG (such as the identifier of the parent PG) will be recorded in the metadata of each sub-PG, forming the association relationship between the sub-PG and the parent PG. In this embodiment, these association relationships are recorded to generate an index table. The index table contains the association relationships between the sub-PGs and the parent PGs, and records the parent PGs of the sub-PGs. As Figure 3 shown, during the PG split process, the view of the PGs in the storage system will be updated, which reflects the number and distribution status of the sub-PGs. The control component (monitor) will send the updated view to the backend storage (raft / lstore). The backend storage executes the split and migration processes according to the new view. After the split is completed, but before the data is migrated, all data access requests sent to the sub-PGs will be forwarded to the corresponding parent PG for processing after determining the parent PG corresponding to the sub-PG through the index table. This can ensure the coherence of data access and the stability of the system during the split. After the split is completed, the control component (monitor) will automatically trigger the data migration process. The sub-PGs start to migrate data from the parent PGs, and through the automatic rebalancing mechanism of the storage pool, the data is evenly distributed to the newly generated sub-PGs to reduce the data load of a single PG. After the above split process and data migration process are completed, the control component (monitor) will reset the state of the entire cluster to the state before the split, indicating that the split operation has been successfully completed, and the placement group cluster resumes normal operation.

[0055] Through the above steps, it is possible to achieve data access related to placement groups on the basis of reducing user operation participation, improving data access efficiency; reducing user operation participation in the splitting process of placement groups, simplifying user operations in the splitting process of placement groups, reducing the complexity of user operations in the splitting of placement groups, and improving the efficiency of splitting placement groups; during the splitting process of placement groups, an index table of sub-placement groups and parent placement groups is established, and data access during the splitting process is implemented based on the index table. This design makes the data access method provided by the embodiments of the present application applicable to different types of storage systems, expands the application scenarios of the data access method related to placement groups, and improves the application flexibility of the data access method.

[0056] Figure 4 is a structural diagram of a data access device provided according to an embodiment of the present application, as Figure 4 shown, the device includes: a receiving module 40, configured to receive an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit for managing data distribution in a storage system; a first determination module 42, configured to determine the state of the storage system at a target moment according to relevant information of the target placement group, where the state includes: in splitting, split completed; a second determination module 44, configured to determine a data access policy according to the state of the storage system at the target moment, where the data access policy is used to indicate an object of a data access operation; and an execution module 46, configured to implement data access by using the data access policy.

[0057] When the device for data access executes the data access method provided in the embodiments of the present application, it receives an access instruction through the receiving module 40. Among them, the access instruction can be sent by a user or an application program interacting with the storage system, and the instruction carries the identifier of the target placement group, which is used to indicate in which placement group the data to be accessed is located. The placement group and the target placement group are the basic logical units for data distribution management in the storage system. Next, after determining the target placement group, the first determination module 42 determines the state of the storage system at the target moment. For example, by obtaining the metadata of the target placement group and reading all the information related to the PG from the metadata. If the metadata contains identification information specific to splitting (such as the identifier of the parent PG or the splitting status flag), it is determined that the storage system is in the splitting process (the state during splitting); if the metadata does not contain these splitting identification information, the storage system is in the state of splitting completion. Further, the second determination module 44 determines the data access policy according to the state of the storage system at the target moment. Specifically, when the state of the storage system at the target moment is in splitting, the data access policy is determined to be the data access policy corresponding to the state during splitting (i.e., the first policy). When executing the first policy, the access instruction is redirected to the parent placement group associated with the target placement group; if the state of the storage system at the target moment is splitting completion, the data access policy is determined to be the data access policy corresponding to the state of splitting completion (i.e., the second policy). When executing the second policy, the target placement group is directly accessed because at this time the child PG has completed data migration and can independently provide data access services. Finally, the execution module 46 executes the data access policy determined by the second determination module 44. Among them, the execution process of data access in the state during splitting is as follows: The storage system finds the parent placement group of the target placement group by querying the index table containing the association relationship between PGs, and forwards the access instruction to the parent placement group for data reading and writing operations, ensuring that the data access service during the splitting process is uninterrupted; the execution process of data access in the state of splitting completion is as follows: The storage system directly performs data access operations on the target placement group without forwarding through the parent placement group, improving the access efficiency and response speed.

[0058] It should be noted that Figure 4 The preferred implementation manners of the embodiments shown can be referred to Figure 2 the relevant descriptions of the embodiments shown, and will not be elaborated here.

[0059] The embodiments of the present application also provide a non-volatile storage medium. A computer program is stored in the non-volatile storage medium, and the above data access method is executed by running the computer program on the device where the non-volatile storage medium is located.

[0060] The above non-volatile storage medium is used to store a program for performing the following functions: receiving an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit in the storage system for managing data distribution; determining the state of the storage system at a target moment according to relevant information of the target placement group, where the state includes: splitting, split completed; determining a data access policy according to the state of the storage system at the target moment, where the data access policy is used to indicate the object of the data access operation; and implementing data access by using the data access policy.

[0061] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the above data access method through the computer program.

[0062] The processor in the above electronic device is used to run a program for performing the following functions: receiving an access instruction, where the access instruction is used to indicate accessing data from a target placement group, and the target placement group is a logical storage unit in the storage system for managing data distribution; determining the state of the storage system at a target moment according to relevant information of the target placement group, where the state includes: splitting, split completed; determining a data access policy according to the state of the storage system at the target moment, where the data access policy is used to indicate the object of the data access operation; and implementing data access by using the data access policy.

[0063] An embodiment of the present application further provides a computer program product, including computer instructions, and when the computer instructions are executed by a processor, the steps of the above data access method are implemented.

[0064] It should be noted that each module in the above data access device may be a program module (for example, a set of program instructions for implementing a specific function), or a hardware module. For the latter, it may be presented in the following forms, but not limited to: the manifestation form of each of the above modules is a processor, or the functions of each of the above modules are implemented by a processor.

[0065] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0066] In the above embodiments of the present application, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0067] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0068] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0069] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0070] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the related technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. And the aforementioned storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical discs that can store program codes.

[0071] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.< / poolname> < / poolname>

Claims

1. A method for data access, characterized in that: include: receiving an access instruction, wherein the access instruction is used to instruct access to data from a target placement group, wherein the target placement group is a logical storage unit in a storage system for managing data distribution; Determine the state of the storage system at the target time according to the relevant information of the target placement group, wherein the state includes: splitting, splitting completed; Determining a data access strategy according to the state of the storage system at the target time, wherein the data access strategy is used to indicate an object of a data access operation; The data access strategy is adopted to implement data access.

2. The method according to claim 1, characterized in that: Determining the state of the storage system at a target time according to the relevant information of the target placement group includes: Acquire relevant information of the target placement group, wherein the relevant information includes at least metadata of the target placement group; The state of the storage system at the target time is determined according to the metadata.

3. The method according to claim 2, characterized in that Determining the state of the storage system at a target time according to the metadata includes: In a case where the metadata includes placement group identification information, determining that the state of the storage system is in the splitting state, wherein each placement group identification information is used to uniquely identify each placement group; In a case where the metadata does not include the placement group identification information, it is determined that the state of the storage system is the split completion.

4. The method according to claim 1, characterized in that: Determining a data access strategy according to the state of the storage system at a target time includes: In the case where the state of the storage system at the target time is in the splitting state, determining that the data access strategy is a first strategy, wherein the first strategy indicates that the object of the data access operation is another placement group associated with the target placement group; When the state of the storage system at the target time is that the split is completed, the data access strategy is determined to be a second strategy, wherein the second strategy indicates that the object of the data access is the target placement group.

5. The method according to claim 4, characterized in that The data access strategy is adopted to implement data access, including: When the data access strategy is the first strategy, obtaining an index table, wherein the index table is used to record association relationships between multiple placement groups; Querying the target placement group in the index table, and determining a parent placement group associated with the target placement group in the index table, wherein the target placement group is generated by splitting the parent placement group; The data access operation is performed on the parent placement group.

6. The method according to claim 5, characterized in that The index table is generated by the following method: when a split process is executed on the storage system, wherein the split process is executed on the storage system, including: Receive a storage pool name, wherein the storage pool name is used to indicate a logical storage unit for which a split process is to be performed; Fill the storage pool name into the split instruction template to obtain a target split instruction; Under the triggering of the target split instruction, the split process is executed on the logical storage unit of the split process to be executed to obtain the index table.

7. The method according to claim 6, characterized in that Executing the splitting process on the logical storage unit of the splitting process to be executed to obtain the index table includes: Executing the splitting process on the logical storage unit to be split, to obtain a plurality of sub-placement groups; The index table is established according to the relationship between the plurality of child placement groups and the plurality of original placement groups, wherein the original placement group is the parent placement group.

8. A data access device, characterized in that: include: A receiving module, configured to receive an access instruction, wherein the access instruction is used to instruct access to data from a target placement group, wherein the target placement group is a logical storage unit in a storage system for managing data distribution; A first determination module is used to determine the state of the storage system at a target time according to the relevant information of the target placement group, wherein the state includes: splitting, splitting completed; A second determination module, configured to determine a data access strategy according to the state of the storage system at a target time, wherein the data access strategy is used to indicate an object of a data access operation; An execution module is used to implement data access by adopting the data access strategy.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the data access method described in any one of claims 1 to 7 is executed by running the computer program on the device where the non-volatile storage medium is located.

10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the data access method according to any one of claims 1 to 7 through the computer program.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the data access method described in any one of claims 1 to 7 are implemented.