Data access method, device, equipment and storage medium

文档序号:1904108 发布日期:2021-11-30 浏览:2次 中文

阅读说明:本技术 一种数据存取方法、装置、设备及存储介质 (Data access method, device, equipment and storage medium ) 是由 马旭 于 2021-07-28 设计创作,主要内容包括:本申请公开了一种数据存取方法、装置、设备及存储介质,包括:根据主机类型对存储侧上创建的主机进行分类,以得到用于与虚拟卷进行通信的目标主机;创建协议代理卷,并将所述协议代理卷映射至所述目标主机,以建立所述存储侧与所述目标主机之间的目标通信链路;根据存取需求在目标存储池中创建相应的目标虚拟卷,并通过所述目标通信链路将所述目标虚拟卷映射至所述目标主机,以便所述目标主机利用所述目标虚拟卷进行数据存取。本申请将主机侧与存储卷之间的多条链路通信转化为主机侧与存储侧上协议代理之间的通信,简化主机侧与存储侧之间数据通信,提高通信效率,减少主机侧的宽带占用。(The application discloses a data access method, a device, equipment and a storage medium, comprising the following steps: classifying hosts created on a storage side according to host types to obtain target hosts for communicating with the virtual volumes; creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host; and creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access. According to the method and the device, the communication of a plurality of links between the host side and the storage volume is converted into the communication between the protocol agents on the host side and the storage side, the data communication between the host side and the storage side is simplified, the communication efficiency is improved, and the broadband occupation of the host side is reduced.)

1. A method for accessing data, comprising:

classifying hosts created on a storage side according to host types to obtain target hosts for communicating with the virtual volumes;

creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host;

and creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access.

2. The data access method of claim 1, wherein creating the corresponding target virtual volume in the target storage pool according to the access requirement comprises:

controlling users with preset authority to create corresponding target virtual volumes in the target storage pool according to the access requirements; and the preset authority is the authority for performing preset operation on the target storage pool and the target virtual volume.

3. The data access method of claim 1, wherein creating the corresponding target virtual volume in the target storage pool according to the access requirement comprises:

and acquiring an interface of a target storage pool, and creating a corresponding target virtual volume in the target storage pool through the interface according to an access requirement.

4. The data access method of claim 3, wherein after creating the corresponding target virtual volume in the target storage pool according to the access requirement through the interface, further comprising:

and correspondingly processing the metadata corresponding to the target virtual volume through the interface.

5. The data access method of claim 1, wherein mapping the target virtual volume to the target host via the target communication link for data access by the target host using the target virtual volume comprises:

and determining a target pool name of the target storage pool, and mapping the target virtual volume to the target host through the target communication link in a manner of combining a name space with the target pool name, so that the target host utilizes the target virtual volume to perform data access.

6. The data access method of any one of claims 1 to 5, further comprising:

classifying hosts created on a storage side according to host types to obtain common hosts used for communicating with a common volume;

and mapping the ordinary volume in the ordinary storage pool to the ordinary host so that the ordinary host utilizes the ordinary volume to perform data access.

7. The data access method of claim 6, further comprising:

and classifying the storage pools of the storage side in advance to obtain the target storage pool and the ordinary storage pool.

8. A data access device, comprising:

the classification module is used for classifying the host established on the storage side according to the host type to obtain a target host used for communicating with the virtual volume;

the construction module is used for creating a protocol proxy volume and mapping the protocol proxy volume to the target host so as to establish a target communication link between the storage side and the target host;

and the access module is used for creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host can utilize the target virtual volume to perform data access.

9. An electronic device, comprising a processor and a memory; wherein the memory is for storing a computer program that is loaded and executed by the processor to implement the data access method of any of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions which, when loaded and executed by a processor, carry out a data access method according to any one of claims 1 to 7.

Technical Field

The present invention relates to the field of computer technologies, and in particular, to a data access method, apparatus, device, and storage medium.

Background

When an existing host side uses a storage volume device of a storage system, each storage volume device needs to establish a link connection between the host side and the storage system, and then the storage volume device can be used on the host side. When the number of the storage volume devices mapped by the host side is small, the links between the host side and the storage system are also small and can be managed, but when the number of the storage volume devices mapped by the storage system to the host side is large, the links between the host side and the storage system are increased, so that the management is difficult, and meanwhile, the data layer communication efficiency can be influenced by a plurality of links between the host side and the storage system.

Therefore, how to improve the data communication efficiency between the host side and the storage system to achieve the access of the host side data is an urgent technical problem to be solved by those skilled in the art.

Disclosure of Invention

In view of the above, an object of the present invention is to provide a data access method, apparatus, device and storage medium, which can convert multiple link communications between a host side and a storage volume into communications between a protocol proxy on the host side and a protocol proxy on the storage side, simplify data communications between the host side and the storage side, improve communication efficiency and reduce broadband occupation on the host side. The specific scheme is as follows:

a first aspect of the present application provides a data access method, including:

classifying hosts created on a storage side according to host types to obtain target hosts for communicating with the virtual volumes;

creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host;

and creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access.

Optionally, the creating a corresponding target virtual volume in the target storage pool according to the access requirement includes:

controlling users with preset authority to create corresponding target virtual volumes in the target storage pool according to the access requirements; and the preset authority is the authority for performing preset operation on the target storage pool and the target virtual volume.

Optionally, the creating a corresponding target virtual volume in the target storage pool according to the access requirement includes:

and acquiring an interface of a target storage pool, and creating a corresponding target virtual volume in the target storage pool through the interface according to an access requirement.

Optionally, after creating a corresponding target virtual volume in the target storage pool according to the access requirement through the interface, the method further includes:

and correspondingly processing the metadata corresponding to the target virtual volume through the interface.

Optionally, the mapping the target virtual volume to the target host through the target communication link, so that the target host performs data access by using the target virtual volume, includes:

and determining a target pool name of the target storage pool, and mapping the target virtual volume to the target host through the target communication link in a manner of combining a name space with the target pool name, so that the target host utilizes the target virtual volume to perform data access.

Optionally, the data access method is further characterized by comprising:

classifying hosts created on a storage side according to host types to obtain common hosts used for communicating with a common volume;

and mapping the ordinary volume in the ordinary storage pool to the ordinary host so that the ordinary host utilizes the ordinary volume to perform data access.

Optionally, the data access method is further characterized by comprising:

and classifying the storage pools of the storage side in advance to obtain the target storage pool and the ordinary storage pool.

A second aspect of the present application provides a data access apparatus comprising:

the classification module is used for classifying the host established on the storage side according to the host type to obtain a target host used for communicating with the virtual volume;

the construction module is used for creating a protocol proxy volume and mapping the protocol proxy volume to the target host so as to establish a target communication link between the storage side and the target host;

and the access module is used for creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host can utilize the target virtual volume to perform data access.

A third aspect of the application provides an electronic device comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the aforementioned data access method.

A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions that, when loaded and executed by a processor, implement the aforementioned data access method.

In the method, the hosts established on the storage side are classified according to the host types to obtain target hosts used for communicating with the virtual volumes; then creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host; and finally, creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access. It can be seen. According to the method and the device, the hosts on the storage side are classified to obtain the target hosts used for communicating with the virtual volumes, then the protocol proxy volumes are established, the target communication links between the protocol proxy volumes and the target hosts are established, and indirect communication between the target virtual volumes and the target hosts is achieved through the target communication links. The method has the advantages that the communication of a plurality of links between the host side and the storage volume is converted into the communication between the protocol agents on the host side and the storage side, the data communication between the host side and the storage side is simplified, the communication efficiency is improved, and the broadband occupation of the host side is reduced.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

FIG. 1 is a flow chart of a data access method provided herein;

FIG. 2 is a diagram illustrating a general host-storage side communication model provided in the present application;

FIG. 3 is a schematic diagram of a target host and storage side communication model provided in the present application;

FIG. 4 is a schematic diagram of a data access device according to the present application;

fig. 5 is a block diagram of a data access electronic device according to the present application.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.

When an existing host side uses a storage volume device of a storage system, each storage volume device needs to establish a link connection between the host side and the storage system, and then the storage volume device can be used on the host side. When the number of the storage volume devices mapped by the host side is small, the links between the host side and the storage system are also small and can be managed, but when the number of the storage volume devices mapped by the storage system to the host side is large, the links between the host side and the storage system are increased, so that the management is difficult, and meanwhile, the data layer communication efficiency can be influenced by a plurality of links between the host side and the storage system. In view of the above technical drawbacks, the present application provides a data access scheme, which classifies hosts on a storage side to obtain target hosts for communicating with a virtual volume, then creates a protocol proxy volume and establishes a target communication link between the protocol proxy volume and the target hosts, and realizes indirect communication between the target virtual volume and the target hosts through the target communication link. The method has the advantages that the communication of a plurality of links between the host side and the storage volume is converted into the communication between the protocol agents on the host side and the storage side, the data communication between the host side and the storage side is simplified, the communication efficiency is improved, and the broadband occupation of the host side is reduced.

Fig. 1 is a flowchart of a data access method according to an embodiment of the present disclosure. Referring to fig. 1, the data access method includes:

s11: the hosts created on the storage side are classified according to host type to obtain a target host for communicating with the virtual volume.

In this embodiment, the hosts created on the storage side are classified according to the host type to obtain a target host for communicating with the virtual volume. In order to implement the data access scheme in this embodiment, it is necessary to perform corresponding improvements on the host side and the storage side, and the storage side and the host side are combined to implement the functions of the protocol proxy volume, the virtual volume host, the virtual volume storage pool, the virtual volume metadata, and the virtual volume. The types of hosts created on the storage system are first classified to distinguish between normal hosts and hosts used for virtual volume communication. The target host is mainly used for carrying out data communication with the virtual volume in the storage system so as to realize data access.

In order to improve the diversity and compatibility of data access manners, for a host that does not need to perform data access through a virtual volume, a connection relationship directly established with a normal volume can be selected autonomously to implement data communication. Correspondingly, the storage pools on the storage side are classified in advance to obtain the target storage pool and the normal storage pool. That is, the storage pools on the storage system are distinguished, the ordinary storage pool and the storage pool used for creating the virtual volume are distinguished, and the ordinary volume in the ordinary storage pool is directly mapped to the ordinary host, so that the ordinary host performs data access by using the ordinary volume, as shown in fig. 2 specifically.

S12: creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host.

In this embodiment, a protocol proxy volume is created, and the protocol proxy volume is mapped to the target host to establish a target communication link between the storage side and the target host. The protocol proxy volume is a special volume which is created by the storage system and is used as a protocol proxy, and is not used for data access, in-band commands issued by in-band communication are all issued to the protocol proxy volume, and are processed or forwarded by the protocol proxy volume in a centralized way, and in-band communication between the protocol proxy volume and the virtual volume is processed by the interior of the storage system. And the link layer maps the protocol proxy volume to a host side through a special host type on the storage system so as to establish a target communication link between the storage side and the target host, wherein the target communication link replaces a plurality of original communication links between the host side and a storage volume on the storage side. The method greatly reduces the difficulty of managing numerous storage volumes by the host side, improves the communication efficiency between the host side and the storage system, can convert the data copying operation of the host side into volume copying of the storage side, and reduces the bandwidth occupation of the host side.

S13: and creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access.

In this embodiment, after a target communication link is established between the storage side and the target host, a corresponding target virtual volume is created in a target storage pool according to an access requirement, and the target virtual volume is mapped to the target host through the target communication link, so that the target host performs data access by using the target virtual volume. In order to ensure the operation safety, special authority can be given to the storage system user for operating the virtual volume and the storage pool in which the virtual volume is located. Specifically, a user with a preset authority is controlled to create a corresponding target virtual volume in a target storage pool according to an access requirement; and the preset authority is the authority for performing preset operation on the target storage pool and the target virtual volume.

In this embodiment, the interaction between the target host and the storage side is realized by an interface call mode to improve reusability. Therefore, when creating a corresponding target virtual volume in the target storage pool according to the access requirement, an interface of the target storage pool needs to be obtained first, and then the corresponding target virtual volume is created in the target storage pool according to the access requirement through the interface. And further carrying out corresponding processing on the metadata corresponding to the target virtual volume through the interface. The storage system provides the interface for the creation, deletion, update, and retrieval of metadata for the virtual volume). It is understood that, when performing data operations on the host side, one piece of metadata is created for each target virtual volume created in the target storage pool. A complete object or a complete piece of data (e.g., a virtual machine) on the host side may correspond to a combination of multiple target virtual volumes and corresponding metadata. In this embodiment, the host side may implement, by a user with special permission, the creation of the target storage pool where the target virtual volume is located, and the deletion of the interface, and other operations. And simultaneously creating an interface for creating, deleting, updating and acquiring the metadata of the virtual volume.

In this embodiment, the specific process of mapping the target virtual volume to the target host through the target communication link may include: and determining a target pool name of the target storage pool, and mapping the target virtual volume to the target host through the target communication link in a manner of combining a name space with the target pool name, so that the target host utilizes the target virtual volume to perform data access. The target host discovers an interface of the target storage pool where the target virtual volume is located, maps the target storage pool to a host side for use in a mode of combining a name space and a pool name, and the host side uses the storage pool with a unique specific name space and the pool name as a virtual volume data center, wherein the name space is uniquely realized by different manufacturers. That is, in this embodiment, a storage pool on the storage system is limited to be used by a virtual volume through a namespace, a user with special authority can operate (create, acquire, delete, update, etc.) the virtual volume through authority control, communication between the host side and the storage system protocol proxy is established through a special host type, and data communication from the host side to the storage volume device of the storage system is realized through the protocol proxy volume, the storage volume, and the storage volume data, as shown in fig. 3 specifically.

Therefore, according to the embodiment of the application, the hosts created on the storage side are classified according to the host types to obtain the target host used for communicating with the virtual volume; then creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host; and finally, creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access. According to the method and the device, the hosts on the storage side are classified to obtain the target host used for communicating with the virtual volume, then the protocol proxy volume is established, the target communication link between the protocol proxy volume and the target host is established, and indirect communication between the target virtual volume and the target host is achieved through the target communication link. The method has the advantages that the communication of a plurality of links between the host side and the storage volume is converted into the communication between the protocol agents on the host side and the storage side, the data communication between the host side and the storage side is simplified, the communication efficiency is improved, and the broadband occupation of the host side is reduced.

Referring to fig. 4, an embodiment of the present application further discloses a data access apparatus, which includes:

a classification module 11, configured to classify hosts created on a storage side according to a host type to obtain a target host for communicating with a virtual volume;

a building module 12, configured to create a protocol proxy volume, and map the protocol proxy volume to the target host, so as to establish a target communication link between the storage side and the target host;

the access module 13 is configured to create a corresponding target virtual volume in a target storage pool according to an access requirement, and map the target virtual volume to the target host through the target communication link, so that the target host performs data access by using the target virtual volume.

Therefore, according to the embodiment of the application, the hosts created on the storage side are classified according to the host types to obtain the target host used for communicating with the virtual volume; then creating a protocol proxy volume and mapping the protocol proxy volume to the target host to establish a target communication link between the storage side and the target host; and finally, creating a corresponding target virtual volume in a target storage pool according to the access requirement, and mapping the target virtual volume to the target host through the target communication link, so that the target host utilizes the target virtual volume to perform data access. According to the method and the device, the hosts on the storage side are classified to obtain the target host used for communicating with the virtual volume, then the protocol proxy volume is established, the target communication link between the protocol proxy volume and the target host is established, and indirect communication between the target virtual volume and the target host is achieved through the target communication link. The method has the advantages that the communication of a plurality of links between the host side and the storage volume is converted into the communication between the protocol agents on the host side and the storage side, the data communication between the host side and the storage side is simplified, the communication efficiency is improved, and the broadband occupation of the host side is reduced.

In some embodiments, the access module 13 specifically includes:

the virtual volume creating unit is used for controlling a user with preset authority to create a corresponding target virtual volume in the target storage pool according to the access requirement; the preset authority is the authority for performing preset operation on the target storage pool and the target virtual volume;

and the mapping unit is used for determining a target pool name of the target storage pool and mapping the target virtual volume to the target host machine in a manner of combining a name space with the target pool name through the target communication link, so that the target host machine can utilize the target virtual volume to perform data access.

In some embodiments, the virtual volume creating unit is further configured to obtain an interface of the target storage pool, and create a corresponding target virtual volume in the target storage pool according to an access requirement through the interface.

In some specific embodiments, the classifying module 11 is further configured to classify hosts created on a storage side according to host types to obtain normal hosts for communicating with normal volumes, and classify storage pools of the storage side in advance to obtain the target storage pool and the normal storage pool;

correspondingly, the accessing module 13 is further configured to map the ordinary volume in the ordinary storage pool to the ordinary host, so that the ordinary host performs data access by using the ordinary volume.

Further, the embodiment of the application also provides electronic equipment. FIG. 5 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.

Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein, the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the data access method disclosed in any of the foregoing embodiments.

In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.

In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.

The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, and the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the data access method disclosed in any of the foregoing embodiments and executed by the electronic device 20. Data 223 may include access requirements collected by electronic device 20.

Further, an embodiment of the present application further discloses a storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the steps of the data access method disclosed in any of the foregoing embodiments are implemented.

The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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 phrase "comprising an …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The data access method, apparatus, device and storage medium provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in this document by applying specific examples, and the description of the above embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种IO管理方法、系统、设备及计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类