CN109033328B - Access request processing method, device, equipment and readable storage medium - Google Patents

Access request processing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN109033328B
CN109033328B CN201810797720.3A CN201810797720A CN109033328B CN 109033328 B CN109033328 B CN 109033328B CN 201810797720 A CN201810797720 A CN 201810797720A CN 109033328 B CN109033328 B CN 109033328B
Authority
CN
China
Prior art keywords
access request
rbd
nbd
module
file system
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
CN201810797720.3A
Other languages
Chinese (zh)
Other versions
CN109033328A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810797720.3A priority Critical patent/CN109033328B/en
Publication of CN109033328A publication Critical patent/CN109033328A/en
Application granted granted Critical
Publication of CN109033328B publication Critical patent/CN109033328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an access request processing method, which comprises the following steps: acquiring an access request to/dev/nbdx; sending an access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module; calling librbd by the reader process to send an access request to the distributed file system so that the distributed file system can process the access request; and receiving a response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient by using the writer process through the dsock so that the nbdclient processes the response. The performance of rbd is improved, the stability of rbd is enhanced, and the user experience is improved. The invention also discloses an access request processing device, equipment and a readable storage medium, and the access request processing device, the equipment and the readable storage medium have corresponding technical effects.

Description

Access request processing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing an access request.
Background
RBD is a tool that manipulates a Rados Block Device (RBD) image, and QEMU/KVM is used through a Linux RBD kernel driver and an RBD storage driver. Among them, the RBD image is a simple block device, which is striped into small block objects and stored in a RADOS (Reliable, automated Distributed Object Store) Object storage cluster in the Distributed storage system (ceph).
Currently, when the ceph is newer and the kernel is older, there may be some images (the images are tags for storing pictures, and the kernel in the form of < image src ═ relative or absolute path of pictures "/>) cannot support map (a collection class of java) if the ceph is newer. Distributed storage needs to realize all functions of librbd (the librbd is a block storage interface externally provided by ceph) in a kernel (kernel), and cannot meet user requirements.
In summary, how to effectively improve the rbd performance and the like is a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The invention aims to provide an access request processing method, an access request processing device, an access request processing equipment and a readable storage medium, so as to improve the performance of rbd.
In order to solve the technical problems, the invention provides the following technical scheme:
an access request processing method, comprising:
acquiring an access request to/dev/nbdx;
sending the access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module;
the reader process calls librbd to send the access request to the distributed file system so that the distributed file system can process the access request;
and receiving a response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient through the dsock by using the writer process so that the nbdclient processes the response.
Preferably, before the obtaining the access request to/dev/nbdx, the method further includes:
configuring a kvm virtualization environment, and installing a virtual machine by using a virt-manager or virt-install;
writing a preset rbd-nbd driver, and starting a libvirtd daemon process;
and modifying the xml file of the virtual machine, and finding the block device which is mapped by the distributed file system when the device item is added.
Preferably, the modifying the xml file of the virtual machine includes:
writing a storage mode of the rbd into a virtual xml file by using a libvirt api interface, and enabling the storage mode to take effect;
and writing a preset rbd-nbd configuration mode into the xml file.
Preferably, after the virtual machine is installed, before the xml file of the virtual machine is modified, the method further includes:
in an xml file using a virsh command line dump virtual machine.
Preferably, before obtaining the access request to/dev/nbdx, the method further comprises:
when the nbdclient is started, a socketpair is created; wherein the socketpair comprises nsock, rsock;
transferring the nsock to an nbdkkernel module by using an NBD _ SET _ SOCK ioctl interface;
creating an nbd kernel thread with the nbdkkernel module;
creating nbdserver by using the nbdclient;
the nbd server creates a reader and a writer; the reader monitors the rsock, and the nbdclean calls an NBD _ DO _ IT ioct l interface to enter a kernel to monitor the nsock.
An access request processing apparatus comprising:
the access request acquisition module is used for acquiring an access request to/dev/nbdx;
the first transfer module is used for sending the access request to a reader process through an nsock by utilizing the nbdkkernel thread in the nbdkkernel module;
the second transfer module is used for calling librbd by the reader process to send the access request to the distributed file system so that the distributed file system can process the access request;
and the processing module is used for receiving the response returned by the distributed file system by using the librbd process and sending the response to the nbdclient through the dsock by using the writer process so that the nbdclient can process the response.
Preferably, the method further comprises the following steps:
the configuration module is used for configuring the kvm virtualization environment before the access request to/dev/nbdx is obtained, and installing a virtual machine by utilizing a virt-manager or a virt-install; writing a preset rbd-nbd driver, and starting a libvirtd daemon process; and modifying the xml file of the virtual machine, and finding out the block device which is mapped by the distributed file system and used for adding the device item.
Preferably, the configuration module is specifically configured to write a storage mode of the rbd into a virtual xml file by using a libvirt api interface, and enable the storage mode to take effect; and writing a preset rbd-nbd configuration mode into an xml file.
An access request processing device comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the access request processing method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described access request processing method.
By applying the method provided by the embodiment of the invention, the access request to/dev/nbdx is obtained; sending an access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module; calling librbd by the reader process to send an access request to the distributed file system so that the distributed file system can process the access request; and receiving a response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient by using the writer process through the dsock so that the nbdclient processes the response.
When an access request to/dev/nbdx is acquired, the access request is firstly sent to the distributed file system, and a response returned by the distributed file system is sent to the nbdclient. That is, the rbd tool and the nbd are combined to process the access request of the distributed storage system, and the function which cannot be realized by the original rbd tool can be realized by the nbd. The RBD image is mapped to an NBD (network Block Device) Device, so that the RBD can be used as a conventional local block Device. And by combining a block driving framework, all functions in librdb can be realized for a distributed system in kernel, the performance of rbd is improved, the stability of rbd is enhanced, and the user experience is improved.
Accordingly, embodiments of the present invention further provide an access request processing apparatus, a device, and a readable storage medium corresponding to the access request processing method, which have the above technical effects and are not described herein again.
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 some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an implementation of an access request processing method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an access request processing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an access request processing device in an embodiment of the present invention.
Detailed Description
The core of the invention is to provide an access request processing method, which combines the RBD-NBD to finally realize the mapping of the RBD image into NBD (Network Block Device), namely, the RBD is used as a conventional local Block Device. Specifically, rbd uses an rbd module of a kernel to access a distributed storage system (ceph) for storage, when the ceph is newer and the kernel is older, a feature kernel of some images may not support, and map cannot be performed; nbd uses librbd to access ceph storage, and there is basically no scenario unsupported. The nbd derives a block device at the host, which is a relatively mature traditional mode, all access requests to the device are forwarded to the user space program for processing, the nbd provides a block device driving framework, the block device can be realized in the user space, and similar FUSE supports the realization of a file system in the user space. That is to say, combining the rbd and the nbd, all functions in librdb can be realized in a distributed storage system in a kernel (kernel), the performance of the rbd is improved, the stability of the rbd is enhanced, and the user experience is improved.
Another core of the present invention is to provide the above technical effects by an access request processing apparatus, device and readable storage medium corresponding to the above access request processing method.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart of an access request processing method according to an embodiment of the present invention, where the method includes the following steps:
s101, obtaining an access request to/dev/nbdx.
In the embodiment of the invention, a virtual machine can be set, and the IO request of the virtual machine is the access request to/dev/nbdx.
Wherein, dev in/dev/nbdx is a Device file system, NBD is an NBD (Network Block Device) Device in the Device file system, and x is an NBD Device label. For example, x may be any value from 0 to 32. The monitoring process/monitor preset for/dev/nbdx can be utilized to monitor/dev/nbdx, so as to obtain the access request of NBD.
S102, sending an access request to a reader process through an nsock by using the nbdkkernel thread in the nbdkkernel module.
Wherein, nbdkkernel module is nbd kernel, and nbdkkernel thread is nbd process.
In the embodiment of the present invention, a socket nsock can be created in advance, where nsock is a socket for communication between an nbdkerrel thread in an nbdkerrel module and a reader process. In actual implementation, for convenience of operation, the nbdkeenel module can be used to put the access request into queue one, and then awaken nbdkeenel thread, which sends the access request to the reader process through the nsock.
S103, calling librbd by the reader process to send the access request to the distributed file system so that the distributed file system can process the access request.
The librbd is a block storage interface externally provided by ceph, the librbd interface is specifically a c/c + + interface, and the header files are respectively in ceph-master \ ceph-master \ src \ include \ rb \ librbd. The operations such as mirror image creation, deletion, clone, reading and writing can be carried out in the ceph by utilizing the interface. That is, through the librbd interface, the access request can be sent to ceph, where it is processed. Specifically, since librbd provides one namspace to the outside. Thus, using librbd can use the functions provided by linrbd. In libedb, two classes are provided, namely, rbd and image, so that corresponding functions can be realized in ceph-master \ ceph-master \ src \ librbd.
In actual application, for convenience of operation, the Reader process may place an access request in a queue two, and call librbd to issue the request to ceph. After the Ceph receives the access request, it processes the access request and returns a response to the librbd.
S104, receiving the response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient through the dsock by using the writer process so that the nbdclient processes the response.
In an embodiment of the present invention, a writer process may be created in advance, which connects to nbdclient through a dsock socket.
After receiving the response corresponding to the access request, the writer process may send the response to the nbdclient through dsock. So that nbdclient processes the response accordingly. Specifically, the response may be an operation request sent to the nbdclient, that is, the nbdclient is required to finally complete the processing of the access request.
In practical application, for convenience of operation, the response can be put into the queue three, the writer process is awakened, the writer process sends the response to the nbdclient (user space, i.e. nbd client) through the dsock, and the nbdclient processes the response. After nbdclient finishes processing, the final processing result can be returned to rbd for information feedback, such as output prompt information, according to the access request.
By applying the method provided by the embodiment of the invention, the access request to/dev/nbdx is obtained; sending an access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module; calling librbd by the reader process to send an access request to the distributed file system so that the distributed file system can process the access request; and receiving a response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient by using the writer process through the dsock so that the nbdclient processes the response.
When an access request to/dev/nbdx is acquired, the access request is firstly sent to the distributed file system, and a response returned by the distributed file system is sent to the nbdclient. That is, the rbd tool and the nbd are combined to process the access request of the distributed storage system, and the function which cannot be realized by the original rbd tool can be realized by the nbd. The RBD image is mapped to an NBD (Network Block Device) Device, so that the RBD can be used as a conventional local Block Device. And by combining a block driving framework, all functions in librdb can be realized for a distributed system in kernel, the performance of rbd is improved, the stability of rbd is enhanced, and the user experience is improved.
It should be noted that, based on the first embodiment, the embodiment of the present invention further provides a corresponding improvement scheme. In the following embodiments, steps that are the same as or correspond to those in the first embodiment may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the following modified embodiments.
Example two:
in order to enable those skilled in the art to understand the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention will be described in detail below with reference to environment building configuration before obtaining an access request. The environment building configuration process comprises the following steps:
step one, configuring a kvm virtualization environment, and installing a virtual machine by using a virt-manager or virt-install;
writing a preset rbd-nbd driver and starting a libvirtd daemon process;
and step three, modifying the xml file of the virtual machine, and finding the block device which is mapped by the distributed file system when the device item is added.
For convenience of description, the above three steps will be described in combination.
First, a kvm virtualization environment is configured, and a virtual machine is installed by means of virt-manager or virt-install, and the like. For how to configure the kvm virtualization environment and how to install the virtual machine, reference may be made to a common processing flow, which is not described herein again. Preferably, after the virtual machine is installed, the xml file of the virsh command line dump virtual machine can also be used before the xml file of the virtual machine is modified. That is, the xml file is backup saved so as to be restored to the original state when the xml file is not modified properly.
The steps of the write access request processing method provided in the first embodiment above may be written into the rbd-nbd driver, then the rbd-nbd driver is written into the virtual, and then the libvirtd daemon is started.
Then, the xml file is modified to implement the access request processing method provided by the embodiment of the present invention. When the xml file of the virtual machine is modified, the storage pattern of rbd can be written into the virtual xml file. Specifically, a storage mode of the rbd is written into a virtual xml file by using a libvirt api interface and the virtual xml file is enabled to take effect; and writing a preset rbd-nbd configuration mode into the xml file. The storage mode of the rbd is specifically that, on linux, a disk required by an upper virtual machine application, that is, a block device requiring rbd mapping is operated by a kernel layer of a host to obtain a block device in osd of the distributed file system. And transmitting the request to an IO queue converted into host by the block driving device of the virtualized qemu-kvm.
The modified xml file includes a storage mode for rbd and a configuration mode for rbd-nbd. For example, the xml file of the modified virtual machine may be:
Figure BDA0001736335710000071
Figure BDA0001736335710000081
specifically, when modifying the xml file of the virtual machine, in order to reduce the workload of modification, a block device that is mapped out by using the distributed file system to add the device item may be found. That is, the RBD image needs to be mapped to an NBD (Network Block Device) Device, and thus the found RBD image can be used as a conventional local Block Device in an application. In practical application, after the rbd-nbd processing module is added, the upper-layer virtual machine io request can be processed through the nbd module, then transmitted to librbd, and then fed back to the distributed file system for storage. That is, the function in librbd that rbd cannot realize can be realized by nbd.
Preferably, in order to better implement the technical solution provided by the embodiment of the present invention, after a virtual environment is built and an xml file is configured, each process required for implementing the technical solution provided by the embodiment of the present invention may be created, and a corresponding socket may be created to establish a communication connection between the processes. So that after receiving an access request, the request is processed. Let rbd implement more functionality. Specifically, before acquiring an access request to/dev/nbdx, the following steps are performed:
step one, when nbdclient is started, a socketpair is created; wherein, the socketpair comprises nsock and rsock;
step two, transmitting the nsock to an nbdkernel module by using an NBD _ SET _ SOCK ioctl interface;
step three, creating an nbd kernel thread by using an nbdkkernel module;
step four, creating nbdserver by using nbdclient;
step five, the nbd server creates a reader and a writer; wherein, the reader monitors rsock, and the nbdclean calls an NBD _ DO _ IT ioct l interface to enter a kernel to monitor nsock.
For convenience of description, the above five steps will be explained in combination.
An rbd-nbd program, namely nbdclean, is realized among user spaces, a socket pair is created when the socket pair is started, and the two sockets are respectively nsock and rsock. And transferring the nsock to an nbdkkernel module by using an NBD _ SET _ SOCK ioctl interface, wherein the nbdkkernel module creates nbdkkernel thread read in a queue I, and the nbdclient creates nbdserver. Nbd server creates two threads: reader, writer. Wherein, the reader monitors rsock, the writer is in the queue two, and the nbdclean calls the NBD _ DO _ IT ioct l interface to enter the kernel to monitor nsock.
Corresponding to the above method embodiments, the embodiments of the present invention further provide an access request processing apparatus, and the access request processing apparatus described below and the access request processing method described above may be referred to in correspondence with each other.
Referring to fig. 2, the apparatus includes the following modules:
an access request obtaining module 101, configured to obtain an access request for/dev/nbdx;
the first transfer module 102 is configured to send an access request to a reader process through an nsock by using an nbdkkernel thread in an nbdkkernel module;
the second transfer module 103 is configured to invoke librbd by a reader process to send an access request to the distributed file system, so that the distributed file system processes the access request;
and the processing module 104 is configured to receive a response returned by the distributed file system by using the librbd process, and send the response to the nbdclient through the dsock by using the writer process, so that the nbdclient processes the response.
The first transfer module and the first transfer module are only used for distinguishing that the access request is transmitted between different processes and/or sockets, and do not indicate that the first transfer module and the second transfer module which have an order relation in practical application necessarily exist. In other words, in practical applications, the actions performed by the first transfer module and the second transfer module may be exchanged, or may be implemented by only one module.
By applying the device provided by the embodiment of the invention, an access request to/dev/nbdx is acquired; sending an access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module; calling librbd by the reader process to send an access request to the distributed file system so that the distributed file system can process the access request; and receiving a response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient by using the writer process through the dsock so that the nbdclient processes the response.
When an access request to/dev/nbdx is acquired, the access request is firstly sent to the distributed file system, and a response returned by the distributed file system is sent to the nbdclient. That is, the rbd tool and the nbd are combined to process the access request of the distributed storage system, and the function which cannot be realized by the original rbd tool can be realized by the nbd. The RBD image is mapped to an NBD (network Block Device) Device, so that the RBD can be used as a conventional local block Device. And by combining a block driving framework, all functions in librdb can be realized for a distributed system in kernel, the performance of rbd is improved, the stability of rbd is enhanced, and the user experience is improved.
In one embodiment of the present invention, the method further comprises:
the system comprises a configuration module, a virtual machine module and a virtual machine module, wherein the configuration module is used for configuring a kvm virtualization environment before acquiring an access request to/dev/nbdx, and installing a virtual machine by utilizing a virt-manager or virt-install; writing a preset rbd-nbd driver, and starting a libvirtd daemon process; and modifying the xml file of the virtual machine, and finding out the block device which is mapped by using the distributed file system for adding the device item.
In a specific embodiment of the present invention, the configuration module is specifically configured to write a storage mode of the rbd into a virtual xml file by using a libvirt api interface, and make the storage mode effective; and writing a preset rbd-nbd configuration mode into the xml file.
In one embodiment of the present invention, the method further comprises:
and the backup module is applied to the xml file of the virtual machine before the xml file of the virtual machine is modified after the virtual machine is installed.
In one embodiment of the present invention, the method further comprises:
the process setting module is used for executing the following steps before acquiring the access request of/dev/nbdx:
when the nbdclient is started, a socketpair is created; wherein, the socketpair comprises nsock and rsock;
transmitting the nsock to the nbdkkernel module by using an NBD _ SET _ SOCK ioctl interface;
creating an nbd kernel thread with an nbdkkernel module;
creating nbdserver by using nbdclean;
the nbd server creates a reader and a writer; wherein, the reader monitors rsock, and the nbdclean calls an NBD _ DO _ IT ioct l interface to enter a kernel to monitor nsock.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an access request processing device, and an access request processing device described below and an access request processing method described above may be referred to in correspondence with each other.
Referring to fig. 3, the access request processing apparatus includes:
a memory D1 for storing computer programs;
a processor D2, configured to implement the steps of the access request processing method of the above-mentioned method embodiment when executing the computer program.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and an access request processing method described above may be referred to in correspondence with each other.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the access request processing method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various readable storage media capable of storing program codes.
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.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (8)

1. An access request processing method, comprising:
acquiring an access request to/dev/nbdx;
sending the access request to a reader process through an nsock by utilizing an nbdkkernel thread in an nbdkkernel module; the nsock is a socket between the nbdkkernel thread in the nbdkkernel module and the reader process;
the reader process calls librbd to send the access request to the distributed file system so that the distributed file system can process the access request;
receiving a response returned by the distributed file system by using the librbd process, sending the response to the nbdclient through a dsock by using the writer process so that the nbdclient can process the response and return a processing result to the rbd; the dsock is a socket between the writer process and the nbdclient;
before the obtaining of the access request to/dev/nbdx, the method further includes:
configuring a kvm virtualization environment, and installing a virtual machine by using a virt-manager or virt-install;
writing a preset rbd-nbd driver, and starting a libvirtd daemon process;
and modifying the xml file of the virtual machine, and finding out the block device which is mapped by the distributed file system and used for adding the device item.
2. The method of claim 1, wherein modifying the xml file of the virtual machine comprises:
writing the storage mode of the rbd into a virtual xml file by using a libvirt api interface, and enabling the storage mode to be effective;
and writing a preset rbd-nbd configuration mode into the xml file.
3. The method of claim 1, wherein after installing the virtual machine, before modifying the xml file of the virtual machine, the method further comprises:
in an xml file using a virsh command line dump virtual machine.
4. The method according to any one of claims 1 to 3, further comprising, before acquiring the access request for/dev/nbdx:
when the nbdclient is started, a socketpair is created; wherein the socketpair comprises nsock, rsock;
transferring the nsock to an nbdkkernel module by using an NBD _ SET _ SOCK ioctl interface;
creating an nbd kernel thread with the nbdkkernel module;
creating nbdserver by using the nbdclient;
the nbd server creates a reader and a writer; the reader monitors the rsock, and the nbdclean calls an NBD _ DO _ IT ioct l interface to enter a kernel to monitor the nsock.
5. An access request processing apparatus, comprising:
the access request acquisition module is used for acquiring an access request to/dev/nbdx;
the first transfer module is used for sending the access request to a reader process through an nsock by utilizing the nbdkkernel thread in the nbdkkernel module;
the second transfer module is used for calling librbd by the reader process to send the access request to the distributed file system so that the distributed file system can process the access request;
the processing module is used for receiving the response returned by the distributed file system by using the librbd process, and sending the response to the nbdclient through the dsock by using the writer process so that the nbdclient can process the response and return the processing result to the rbd;
further comprising:
the configuration module is used for configuring the kvm virtualization environment before the access request to/dev/nbdx is obtained, and installing a virtual machine by utilizing a virt-manager or a virt-install; writing a preset rbd-nbd driver, and starting a libvirtd daemon process; and modifying the xml file of the virtual machine, and finding out the block device which is mapped by the distributed file system and used for adding the device item.
6. The apparatus according to claim 5, wherein the configuration module is specifically configured to write a storage pattern of rbd into a virtual xml file using libvirt api interface and validate the storage pattern; and writing a preset rbd-nbd configuration mode into the xml file.
7. An access request processing apparatus, comprising:
a memory for storing a computer program;
processor for implementing the steps of the access request processing method according to any of claims 1 to 4 when executing said computer program.
8. A readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the access request processing method according to any one of claims 1 to 4.
CN201810797720.3A 2018-07-19 2018-07-19 Access request processing method, device, equipment and readable storage medium Active CN109033328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810797720.3A CN109033328B (en) 2018-07-19 2018-07-19 Access request processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810797720.3A CN109033328B (en) 2018-07-19 2018-07-19 Access request processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109033328A CN109033328A (en) 2018-12-18
CN109033328B true CN109033328B (en) 2022-08-02

Family

ID=64643622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810797720.3A Active CN109033328B (en) 2018-07-19 2018-07-19 Access request processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109033328B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333823B (en) * 2019-05-31 2023-07-07 平安科技(深圳)有限公司 Data migration method, device, equipment and storage medium based on nbd equipment
CN110321321B (en) * 2019-05-31 2023-06-23 平安科技(深圳)有限公司 Snapshot read-write method, device and equipment for network block equipment and storage medium
CN110321075B (en) * 2019-05-31 2023-05-23 平安科技(深圳)有限公司 Data migration method, device, equipment and storage medium based on nbd equipment
CN110321251B (en) * 2019-06-03 2023-06-20 平安科技(深圳)有限公司 Data backup method, device, equipment and storage medium based on network block equipment
CN110336857B (en) * 2019-06-03 2022-04-12 平安科技(深圳)有限公司 Method, device, equipment and storage medium for creating network block equipment
CN110221902B (en) * 2019-06-12 2023-09-29 腾讯科技(深圳)有限公司 Data transmission method and related device based on virtual machine
CN113419673B (en) * 2021-06-05 2022-05-27 济南浪潮数据技术有限公司 Method, system, medium and device for RBD access storage cluster

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561101A (en) * 2013-11-06 2014-02-05 中国联合网络通信集团有限公司 Network file system
CN106970821A (en) * 2016-01-12 2017-07-21 阿里巴巴集团控股有限公司 A kind of method and apparatus that I/O requests are handled under KVM virtualization
CN107729020A (en) * 2017-10-11 2018-02-23 北京航空航天大学 A kind of method for realizing extensive container rapid deployment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7531196B2 (en) * 2003-05-30 2009-05-12 Pacific Specialty Oils, Inc. Cosmeceutical formulation containing palm oils
US9390055B2 (en) * 2012-07-17 2016-07-12 Coho Data, Inc. Systems, methods and devices for integrating end-host and network resources in distributed memory
CN103200245B (en) * 2013-03-21 2016-05-11 杭州电子科技大学 A kind of distributed network caching method based on Device Mapper
CN105468643B (en) * 2014-09-09 2019-05-03 博雅网络游戏开发(深圳)有限公司 The access method and system of distributed file system
WO2017011411A1 (en) * 2015-07-10 2017-01-19 Ohio State Innovation Foundation Methods and compositions relating to anti-nucleolin recombinant immunoagents
CN106699967B (en) * 2015-11-13 2020-04-14 中国石油化工股份有限公司 Method for preparing high-vinyl butylbenzene copolymer by adopting molybdenum-based catalytic system
CN106095527A (en) * 2016-06-07 2016-11-09 国云科技股份有限公司 A kind of storage pool implementation method being applicable to cloud platform virtual machine
CN106095528B (en) * 2016-06-07 2019-06-21 国云科技股份有限公司 A method of detection virtual machine drive
CN106527985A (en) * 2016-11-02 2017-03-22 郑州云海信息技术有限公司 Storage interaction device and storage system based on ceph

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561101A (en) * 2013-11-06 2014-02-05 中国联合网络通信集团有限公司 Network file system
CN106970821A (en) * 2016-01-12 2017-07-21 阿里巴巴集团控股有限公司 A kind of method and apparatus that I/O requests are handled under KVM virtualization
CN107729020A (en) * 2017-10-11 2018-02-23 北京航空航天大学 A kind of method for realizing extensive container rapid deployment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Design and Implementation of Ceph Block Device in Userspace for Container Scenarios;Li Wang 等;《2016 International Symposium on Computer, Consumer and Control》;20160818;383-386 *

Also Published As

Publication number Publication date
CN109033328A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109033328B (en) Access request processing method, device, equipment and readable storage medium
US10949158B2 (en) Screenshot method and apparatus
US11030025B2 (en) Managing inter-process communications in a containerized application environment
US8032588B2 (en) System and method for hosting one or more versions of a service using a service proxy
US20210133002A1 (en) Using scripts to bootstrap applications with metadata from a template
US20140317369A1 (en) Snapshot creation from block lists
EP2993583A1 (en) Method and device for running remote application program
US20080222617A1 (en) Server side application integration framework
CN108418874B (en) Cross-wide-area-network data back-leading method and device, computer equipment and storage medium
US11474853B2 (en) Storage device operation method and physical server
US7295952B1 (en) Enabling high availability and load balancing for JMX Mbeans
US10523754B2 (en) Methods for integrating applications with a data storage network and devices thereof
CN112749022B (en) Camera resource access method, operating system, terminal and virtual camera
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN111582824B (en) Cloud resource synchronization method, device, equipment and storage medium
WO2021008185A1 (en) Data transmission method and apparatus, and server
CN110990116B (en) Method, device and system for transmitting data between intelligent network card and virtual machine
CN111966530A (en) Disaster recovery switching method and device for application system, computer equipment and storage medium
CN114490189A (en) Cloud platform database backup method and device, electronic equipment and storage medium
CN112379952A (en) Method for implementing cross-process callback
CN105302662B (en) Multi-machine backup method and system
CN113885861B (en) Method and device for multiplexing components of cross-system
US11853560B2 (en) Conditional role decision based on source environments
CN115543539A (en) Virtual machine password resetting method, device and medium
CN113282858A (en) Page loading method, device and system and 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