WO2020237849A1 - Snapshot read-write method for network block device, apparatus, device, and storage medium - Google Patents

Snapshot read-write method for network block device, apparatus, device, and storage medium Download PDF

Info

Publication number
WO2020237849A1
WO2020237849A1 PCT/CN2019/101713 CN2019101713W WO2020237849A1 WO 2020237849 A1 WO2020237849 A1 WO 2020237849A1 CN 2019101713 W CN2019101713 W CN 2019101713W WO 2020237849 A1 WO2020237849 A1 WO 2020237849A1
Authority
WO
WIPO (PCT)
Prior art keywords
snapshot
read
write
request
network block
Prior art date
Application number
PCT/CN2019/101713
Other languages
French (fr)
Chinese (zh)
Inventor
王新
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020237849A1 publication Critical patent/WO2020237849A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of computer technology, and in particular to a method, device, device, and storage medium for reading and writing snapshots of network block devices.
  • Ceph distributed system includes Ceph clients and Ceph clusters.
  • Ceph clients include network block devices (network block device), the network block device is referred to as nbd device, and the nbd device is a block device widely used by the Linux system of the Ceph client.
  • the Ceph client can select a created nbd device locally, and use the preset nbd
  • the protocol connects the rbd device of the Ceph cluster.
  • the rbd device can be understood as a storage device in the Ceph cluster.
  • the read and write on the Ceph client nbd device needs to be converted to Ceph
  • the read and write of the rbd device in the cluster after the read and write of the rbd device in the Ceph cluster is completed, the read and write content of the rbd device is obtained and returned to the Ceph client nbd device to complete the read and write to the Ceph client nbd device.
  • the snapshot file system or the snapshot database system is in the Ceph cluster It is a read-only attribute, and it is difficult to meet the needs of creating a writable snapshot file system for nbd devices or a writable snapshot database system.
  • the main purpose of this application is to provide a method, device, device, and storage medium for reading and writing snapshots of network block devices, which aims to solve the problem of creating a writable snapshot file system of nbd devices or a writable snapshot database system in the prior art.
  • this application provides a network block device snapshot read and write method.
  • the network block device snapshot read and write method is applied to a Ceph client in a Ceph distributed system.
  • the Ceph distributed system also includes a Ceph cluster.
  • the network block device snapshot read-write method includes:
  • the Ceph client When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
  • the write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
  • performing a write operation in the rbd-nbd process according to the write type to obtain write data includes:
  • the type of the read-write snapshot request is the type of the write request, determining whether the cache in the rbd-nbd process is empty;
  • the cache in the rbd-nbd process is not empty, acquire the first key value carried in the write request, where the first key value includes write position and write length information;
  • the first key value is less than or equal to the second key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
  • step of judging whether the cache in the rbd-nbd process is empty includes:
  • the request content of the write request is stored in the initial entry in the rbd-nbd process.
  • step of comparing the first key value with the second key value in the cached entry in the cache includes:
  • the request content of the write request corresponding to the first key value and the request content corresponding to the second key are merged and stored.
  • the method includes:
  • the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
  • the step of feeding back the snapshot data fed back by the Ceph cluster for the read-write snapshot request to the network block device includes:
  • the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
  • the snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  • This application also provides a network block device snapshot reading and writing device, the network block device snapshot reading and writing device is applied to a Ceph client in a Ceph distributed system, the Ceph distributed system also includes a Ceph cluster, and the network block
  • the device snapshot reading and writing device includes:
  • the detection module is used to send the read and write snapshot request to the Ceph based on the rbd-nbd process corresponding to the network block device when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device Cluster to obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • An obtaining module used to obtain the type of the read-write snapshot request
  • a write module configured to perform a write operation in the rbd-nbd process according to the write type when the type of the read-write snapshot request is a write request type to obtain write data;
  • the feedback module is used to feed back the write data and the snapshot data to the network block device to start the snapshot database in the network block device.
  • the writing module includes:
  • the first determining unit is configured to determine whether the cache in the rbd-nbd process is empty if the type of the read-write snapshot request is the type of the write request;
  • the first obtaining unit is configured to obtain a first key value carried in the write request if the cache in the rbd-nbd process is not empty, wherein the first key value includes a write position and a write length information;
  • a comparison unit configured to compare the first key value with the second key value in the cached entry in the cache
  • the adding unit is configured to add a new cache entry in the cache if the first key value is less than or equal to the second key value, and store the requested content of the write request in the new cache entry.
  • the writing module includes:
  • a creation unit configured to create an initial entry in the cache if the cache in the rbd-nbd process is empty;
  • the first storage unit is configured to store the request content of the write request in the initial entry in the rbd-nbd process.
  • the writing module further includes:
  • the second storage unit is configured to merge and merge the request content of the write request corresponding to the first key value and the request content corresponding to the second key if the first key value is greater than the second key value storage.
  • the apparatus for reading and writing a snapshot of a network block device further includes:
  • the startup module is used to feed back the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request to the network block device if the type of the read-write snapshot request is a read type, so as to start the network block device Snapshot database in.
  • the startup module includes:
  • the second determining unit is configured to determine whether the cache in the rbd-nbd process is empty if the type of the read-write snapshot request is a read type
  • the second obtaining unit is configured to obtain the target read key value carried in the read request if the cache in the rbd-nbd process is not empty, and obtain the target read key value from the cache according to the target read key value. Read data of the read request;
  • the feedback unit is configured to feed back the snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request to the network block device.
  • this application also provides a network block device snapshot read-write device
  • the network block device snapshot read-write device includes: a memory, a processor, a communication bus, and a network block device stored on the memory Readable instructions for snapshot read and write methods
  • the communication bus is used to realize the communication connection between the processor and the memory
  • the processor is configured to execute the readable instructions of the network block device snapshot read and write method to implement the following steps:
  • the Ceph client When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
  • the write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
  • the present application also provides a storage medium that stores one or more readable instructions, and the one or more readable instructions can be executed by one or more processors to Used for:
  • the Ceph client When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
  • the write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
  • This application sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device when the Ceph client detects the read and write snapshot request to the snapshot database of the network block device,
  • the corresponding snapshot data is obtained from the Ceph cluster, and then the type of the read-write snapshot request is obtained. If the type of the read-write snapshot request is the write type, the write The write content in the request is designed to be carried out and cached in the rbd-nbd process, so that the nbd device can detect the snapshot data and the write data corresponding to the write request, so that the nbd device can be processed based on the snapshot data and the write data corresponding to the write request.
  • a writable snapshot file system or a writable snapshot database system, thus solves the technical problem of creating a writable snapshot file system of an nbd device or a writable snapshot database system in the prior art.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for reading and writing a snapshot of a network block device according to the application;
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for reading and writing a snapshot of a network block device according to the application;
  • FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the method of the embodiment of the present application.
  • This application provides a method for reading and writing a snapshot of a network block device.
  • the method for reading and writing a snapshot of the network block device is applied to a Ceph distributed system
  • the Ceph distributed system also includes a Ceph cluster
  • the network block device snapshot read-write method includes:
  • Step S10 when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • Step S20 acquiring the type of the read-write snapshot request
  • Step S30 if the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
  • Step S40 feeding back the write data and the snapshot data to the network block device to activate the snapshot database in the network block device.
  • Step S10 when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • the Ceph distributed system includes a Ceph client, and the Ceph distributed system also includes a Ceph cluster.
  • the data content in the Ceph cluster is mapped to the Ceph client.
  • the network driver is mapped to the local, that is, the Ceph client.
  • the rbd-nbd process needs to be artificially triggered by the Ceph client first Among them, the two ends of the rbd-nbd process connection are the Ceph client and the Ceph cluster respectively.
  • Triggering the rbd-nbd process manually is to manually select the Ceph cluster and the local disk on the Ceph client by the user. After the selection is completed, the rbd-nbd process is created by clicking and other operations. After the rbd-nbd process is determined to be created, the nbd device is created in the local disk of the Ceph client based on the rbd-nbd process. After the nbd device is created , The user can read or write the data of the Ceph cluster to the local nbd device to complete the reading and writing of the local nbd device. In other words, the read and write on the Ceph client nbd device needs to be converted.
  • the read and write content of the rbd device is obtained and returned to the Ceph client nbd device to complete the read and write to the Ceph client nbd device .
  • the Ceph cluster can be regarded as a network neighbor device. If you want to read the data content of the network neighbor device locally, you need to first determine the network neighbor device address and local disk by the user. After the device address and the local disk, the rbd-nbd process is then triggered. According to the rbd-nbd process, the nbd device is created in the local disk, and based on the rbd-nbd process, the corresponding content is obtained from the network neighbor, and the corresponding The content is stored in the nbd device to determine the completion of the reading and writing of the nbd device.
  • the Ceph client detects a read-write snapshot request to the snapshot database of the network block device
  • the read-write snapshot request is sent based on the rbd-nbd process corresponding to the network block device
  • the driver corresponding to the network block device will obtain the read-write snapshot request, Then forward the read-write snapshot request to the socket structure in the Ceph client.
  • the socket structure connects the rbd-nbd process and the nbd device.
  • the rbd-nbd process obtains the read-write snapshot request from the socket structure, and then reads and writes The snapshot request is sent to the Ceph cluster. After receiving the read-write snapshot request, the Ceph cluster will return the snapshot data based on the read request in the read-write snapshot request. It should be noted that in this embodiment, one end of the rbd-nbd process It is the snapshot volume of the rbd device of the Ceph cluster, that is, because one end of the rbd-nbd process is the snapshot volume of the rbd device of the Ceph cluster, the technical problem in this application will exist.
  • Ceph cluster After the Ceph cluster receives the read-write snapshot request, it will return the snapshot data based on the read request in the read-write snapshot request.
  • the process includes: Ceph cluster parses the read request content of the read-write snapshot request, and returns the snapshot data according to the read request content It should be noted that the Ceph cluster returns the snapshot data based on the content of the read request, which belongs to the prior art and does not make a specific description.
  • Step S20 acquiring the type of the read-write snapshot request
  • the type of the read-write snapshot request is determined.
  • the purpose of determining the type of the read-write snapshot request is to determine whether a write operation is required.
  • the type of the read-write snapshot request is a write type, a write operation is required.
  • Step S30 if the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
  • the write operation is designed in the rbd-nbd process to complete the read-write snapshot request Write request, that is, in this embodiment, as long as it is determined that the type of the read-write snapshot request is a write request type, a temporary cache is opened in the local rbd-nbd process to perform a write operation to obtain write data.
  • performing a write operation in the rbd-nbd process according to the write type to obtain write data includes:
  • Step S31 if the type of the read-write snapshot request is the type of the write request, determine whether the cache in the rbd-nbd process is empty;
  • the cache in the rbd-nbd process may have previously written data. For example, after a previous write operation to the nbd device, it is found that there is an error in the content of the write operation, and a new write operation is required. At this time, The previously written data of the erroneous write operation exists in the rbd-nbd process, and it is necessary to determine whether the cache in the rbd-nbd process is empty when the re-write operation is correspondingly performed.
  • Step S32 if the cache in the rbd-nbd process is not empty, obtain a first key value carried in the write request, where the first key value includes write position and write length information;
  • the first key value and the write content carried in the write request are acquired, where the first key value It includes writing position and writing length information, and the writing content also includes data to be written.
  • Step S33 comparing the first key value with the second key value in the cached entry in the cache
  • the first key value is compared with the second key value in the cached entry in the cache, and the write position in the first key value is compared with the second key value.
  • the writing position in the key value is compared. If the writing position in the first key value is different from the writing position or the writing length in the second key value, then no subsequent writing content comparison is performed. If the first key value is compared
  • the write position in is the same as the write position or the write length in the second key value, then the write content in the write request is compared with the write content in the corresponding second key value.
  • Step S34 If the first key value is less than or equal to the second key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
  • the first key value is less than or equal to the second key value, and if the first key value is less than or equal to the second key value Key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
  • step of judging whether the cache in the rbd-nbd process is empty includes:
  • Step S35 if the cache in the rbd-nbd process is empty, an initial entry will be created in the cache;
  • Step S36 Store the request content of the write request in the initial entry in the rbd-nbd process.
  • Step S40 feeding back the write data and the snapshot data to the network block device to activate the snapshot database in the network block device.
  • the network block device After obtaining the write data and the snapshot data, the write data and the snapshot data are fed back to the network block device, the network block device detects the write data and the snapshot data corresponding to the write request, and performs the The snapshot data in the network block device is started, that is, when the write data corresponding to the write request is detected in the nbd device, the snapshot database can be started.
  • This application sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device when the Ceph client detects the read and write snapshot request to the snapshot database of the network block device,
  • the corresponding snapshot data is obtained from the Ceph cluster, and then the type of the read-write snapshot request is obtained. If the type of the read-write snapshot request is the write type, the write The write content in the request is designed to be carried out and cached in the rbd-nbd process, so that the nbd device can detect the snapshot data and the write data corresponding to the write request, so that the nbd device can be processed based on the snapshot data and the write data corresponding to the write request.
  • a writable snapshot file system or a writable snapshot database system, thus solves the technical problem of creating a writable snapshot file system of an nbd device or a writable snapshot database system in the prior art.
  • the present application provides another embodiment of a method for reading and writing a snapshot of a network block device.
  • the first key value is compared with the second key value in the cached entry in the cache. After the steps include:
  • Step S37 If the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored.
  • Merged storage refers to writing and storing different parts of the writing content corresponding to the first key value and the writing content corresponding to the second key value, and removing the wrong content in the writing content corresponding to the second key value. The same part of the writing content corresponding to the key value and the writing content corresponding to the second key value is not processed.
  • the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored. Determine the correctness of the write operation.
  • this application provides another embodiment of a method for reading and writing a snapshot of a network block device.
  • the step of obtaining the type of the read and write snapshot request includes:
  • Step A1 If the type of the read-write snapshot request is the read type, the snapshot data fed back by the Ceph cluster for the read-write snapshot request is fed back to the network block device to start the network block device Snapshot the database.
  • the snapshot data fed back by the Ceph cluster for the read-write snapshot request is fed back to the network block device to start the network block
  • the snapshot database in the device, that is, for the read request, the snapshot data can be returned directly.
  • the step of feeding back the snapshot data fed back by the Ceph cluster for the read-write snapshot request to the network block device includes:
  • Step B1 if the type of the read-write snapshot request is a read type, it is determined whether the cache in the rbd-nbd process is empty;
  • the purpose of determining whether the cache in the rbd-nbd process is empty is to: Determine whether the nbd device corresponding to the degree request has corresponding read data in the rbd-nbd process before.
  • Step B2 If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read request of the read request from the cache according to the target read key value. data;
  • the cache in the rbd-nbd process is not empty, the corresponding read data is obtained. Specifically, the target read key value carried in the read request is obtained from the cache according to the target read key value. Read the requested read data,
  • Step B3 feeding back the snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request to the network block device.
  • the snapshot data fed back by the Ceph cluster for the read-write snapshot request and the read data are fed back to the network block device.
  • the method further includes:
  • the snapshot data fed back by the Ceph cluster for the read-write snapshot request can be fed back to the network block device.
  • the type of the read-write snapshot request is the read type, it is determined whether the cache in the rbd-nbd process is empty; if the cache in the rbd-nbd process is not empty, then obtain The target read key value carried in the read request, the read data of the read request is obtained from the cache according to the target read key value; the snapshot data fed back by the Ceph cluster for the read and write snapshot request is compared with The read data is fed back to the network block device, and a read request to nbd is implemented in this embodiment.
  • FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
  • the snapshot reading and writing device of the network block device in the embodiment of this application can be a PC, a smart phone, a tablet computer, an e-book reader, MP3 (Moving Picture Experts Group Audio Layer III, moving picture experts compress standard audio layer 3) player, MP4 (Moving Picture Experts) Group Audio Layer IV, dynamic image experts compress standard audio layer 3) Players, portable computers and other terminal equipment.
  • the network block device snapshot read-write device may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection and communication between the processor 1001 and the memory 1005.
  • the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage.
  • the memory 1005 may also be a storage device independent of the foregoing processor 1001.
  • the network block device snapshot read-write device may also include a target user interface, network interface, camera, RF (Radio Frequency (radio frequency) circuits, sensors, audio circuits, WiFi modules, etc.
  • the target user interface may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional target user interface may also include a standard wired interface and a wireless interface.
  • the optional network interface can include standard wired interface and wireless interface (such as WI-FI interface).
  • network block device snapshot read-write device structure shown in FIG. 3 does not constitute a limitation on the network block device snapshot read-write device, and may include more or less components than shown in the figure, or a combination Certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, and readable instructions for a network block device snapshot reading and writing method.
  • the operating system is a readable instruction for managing and controlling the hardware and software resources of the network block device snapshot reading and writing device, and supports the operation of the network block device snapshot reading and writing method readable instructions and other software and/or readable instructions.
  • the network communication module is used to implement communication between various components in the memory 1005, and to communicate with other hardware and software in the network block device snapshot read-write device.
  • the processor 1001 is configured to execute the readable instructions of the network block device snapshot reading and writing method stored in the memory 1005 to implement the network block device snapshot reading described above. Write method steps.
  • the specific implementation of the network block device snapshot read-write device of this application is basically the same as the foregoing embodiments of the network block device snapshot read-write method, and will not be repeated here.
  • This application also provides a network block device snapshot reading and writing device, the network block device snapshot reading and writing device is applied to a Ceph client in a Ceph distributed system, the Ceph distributed system also includes a Ceph cluster, and the network block
  • the device snapshot reading and writing device includes:
  • the detection module is used to send the read and write snapshot request to the Ceph based on the rbd-nbd process corresponding to the network block device when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device Cluster to obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
  • An obtaining module used to obtain the type of the read-write snapshot request
  • a write module configured to perform a write operation in the rbd-nbd process according to the write type when the type of the read-write snapshot request is a write request type to obtain write data;
  • the feedback module is used to feed back the write data and the snapshot data to the network block device to start the snapshot database in the network block device.
  • the specific implementation of the network block device snapshot reading and writing apparatus of the present application is basically the same as the foregoing embodiments of the network block device snapshot reading and writing method, and will not be repeated here.
  • the present application provides a storage medium, the storage medium may be a non-volatile readable storage medium, the storage medium stores one or more readable instructions, the one or more readable instructions may also be One or more processors are executed to implement the steps of the network block device snapshot reading and writing method described above.
  • the specific implementation of the storage medium of the present application is basically the same as the foregoing embodiments of the network block device snapshot reading and writing method, and will not be repeated here.

Abstract

The present application discloses a snapshot read-write method for a network block device, an apparatus, a device, and a storage medium. The method comprises: when a Ceph client detects that a snapshot database of a network block device has received a snapshot read-write request, sending, on the basis of an rbd-nbd process corresponding to the network block device, the snapshot read-write request to a Ceph cluster so as to acquire snapshot data fed back by the Ceph cluster in response to the snapshot read-write request; acquiring the snapshot read-write request type; if the snapshot read-write request type is write, performing a write operation in the rbd-nbd process according to the write type, so as to acquire written data; and feeding the written data and the snapshot data back to the network block device so as to start the snapshot database in the network block device. The present application aims to resolve the technical issue of the prior art by means of a distributed system, and in which creating a writable snapshot file system or a writable snapshot database system of an nbd device is difficult.

Description

网络块设备快照读写方法、装置、设备及存储介质 Method, device, device and storage medium for reading and writing snapshots of network block equipment To
本申请要求于2019年05月31日提交中国专利局、申请号为201910480680.4、发明名称为“网络块设备快照读写方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on May 31, 2019, the application number is 201910480680.4, and the invention title is "Network block device snapshot reading and writing methods, devices, equipment, and storage media". The entire content Incorporated in the application by reference.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种网络块设备快照读写方法、装置、设备及存储介质。This application relates to the field of computer technology, and in particular to a method, device, device, and storage medium for reading and writing snapshots of network block devices.
背景技术Background technique
Ceph分布式系统中,包括Ceph客户端以及Ceph集群,其中,Ceph客户端中包括网络块设备(network block device),该网络块设备简称nbd设备,且该nbd设备是Ceph客户端的linux系统广发使用的一种块设备,其中,Ceph客户端可以在本地选取一个创建好的nbd设备,通过预设的nbd协议连接Ceph集群的rbd设备,具体地,rbd设备可以理解为Ceph集群中的一个存储设备,需要说明的是,Ceph分布式系统中,在Ceph客户端nbd设备上的读写需要转换为对Ceph集群中rbd设备的读写,在Ceph集群中rbd设备的读写完成后,获取rbd设备的读写内容,返回给Ceph客户端nbd设备,以完成对Ceph客户端nbd设备的读写。Ceph distributed system includes Ceph clients and Ceph clusters. Among them, Ceph clients include network block devices (network block device), the network block device is referred to as nbd device, and the nbd device is a block device widely used by the Linux system of the Ceph client. Among them, the Ceph client can select a created nbd device locally, and use the preset nbd The protocol connects the rbd device of the Ceph cluster. Specifically, the rbd device can be understood as a storage device in the Ceph cluster. It should be noted that in the Ceph distributed system, the read and write on the Ceph client nbd device needs to be converted to Ceph The read and write of the rbd device in the cluster, after the read and write of the rbd device in the Ceph cluster is completed, the read and write content of the rbd device is obtained and returned to the Ceph client nbd device to complete the read and write to the Ceph client nbd device.
Ceph分布式系统中,如果通过nbd设备连接rbd设备中的快照存储卷imageA,以实现在nbd设备上创建快照文件系统,或者部署快照数据库系统时,这个快照文件系统或者快照数据库系统在Ceph集群中是只读属性的,难以满足创建nbd设备的可写快照文件系统,或者可写快照数据库系统的需求。In the Ceph distributed system, if you connect the snapshot storage volume imageA in the rbd device through the nbd device to create a snapshot file system on the nbd device, or deploy a snapshot database system, the snapshot file system or the snapshot database system is in the Ceph cluster It is a read-only attribute, and it is difficult to meet the needs of creating a writable snapshot file system for nbd devices or a writable snapshot database system.
发明内容Summary of the invention
本申请的主要目的在于提供一种网络块设备快照读写方法、装置、设备及存储介质,旨在解决现有技术中,难以满足创建nbd设备的可写快照文件系统,或者可写快照数据库系统的技术问题。The main purpose of this application is to provide a method, device, device, and storage medium for reading and writing snapshots of network block devices, which aims to solve the problem of creating a writable snapshot file system of nbd devices or a writable snapshot database system in the prior art. Technical issues.
为实现上述目的,本申请提供一种网络块设备快照读写方法所述网络块设备快照读写方法应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写方法包括:In order to achieve the above purpose, this application provides a network block device snapshot read and write method. The network block device snapshot read and write method is applied to a Ceph client in a Ceph distributed system. The Ceph distributed system also includes a Ceph cluster. The network block device snapshot read-write method includes:
在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
获取所述读写快照请求的类型;Acquiring the type of the read-write snapshot request;
若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;If the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
可选地,所述若所述读写快照请求的类型为写类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据步骤包括:Optionally, if the type of the read-write snapshot request is a write type, performing a write operation in the rbd-nbd process according to the write type to obtain write data includes:
若所述读写快照请求的类型为写请求的类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is the type of the write request, determining whether the cache in the rbd-nbd process is empty;
若所述rbd-nbd进程中的缓存不为空,则获取所述写请求中携带的第一键值,其中,所述第一键值中包括写位置以及写长度信息;If the cache in the rbd-nbd process is not empty, acquire the first key value carried in the write request, where the first key value includes write position and write length information;
将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对;Comparing the first key value with the second key value in the cached entry in the cache;
若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。If the first key value is less than or equal to the second key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
可选地,所述判断所述rbd-nbd进程中的缓存是否为空步骤之后包括:Optionally, after the step of judging whether the cache in the rbd-nbd process is empty includes:
若所述rbd-nbd进程中的缓存为空时,将在所述缓存中创建初始条目;If the cache in the rbd-nbd process is empty, an initial entry will be created in the cache;
将所述写请求的请求内容存储在rbd-nbd进程中的初始条目中。The request content of the write request is stored in the initial entry in the rbd-nbd process.
可选地,所述将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对步骤之后包括:Optionally, after the step of comparing the first key value with the second key value in the cached entry in the cache includes:
若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并并存储。If the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are merged and stored.
可选地,所述获取所述读写快照请求的类型步骤之后包括:Optionally, after the step of obtaining the type of the read-write snapshot request, the method includes:
若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。If the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
可选地,,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:Optionally, if the type of the read-write snapshot request is a read type, the step of feeding back the snapshot data fed back by the Ceph cluster for the read-write snapshot request to the network block device includes:
若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
本申请还提供一种网络块设备快照读写装置,所述网络块设备快照读写装置应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写装置包括:This application also provides a network block device snapshot reading and writing device, the network block device snapshot reading and writing device is applied to a Ceph client in a Ceph distributed system, the Ceph distributed system also includes a Ceph cluster, and the network block The device snapshot reading and writing device includes:
检测模块,用于在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;The detection module is used to send the read and write snapshot request to the Ceph based on the rbd-nbd process corresponding to the network block device when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device Cluster to obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
获取模块,用于获取所述读写快照请求的类型;An obtaining module, used to obtain the type of the read-write snapshot request;
写模块,用于若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;A write module, configured to perform a write operation in the rbd-nbd process according to the write type when the type of the read-write snapshot request is a write request type to obtain write data;
反馈模块,用于将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The feedback module is used to feed back the write data and the snapshot data to the network block device to start the snapshot database in the network block device.
可选地,所述写模块包括:Optionally, the writing module includes:
第一判断单元,用于若所述读写快照请求的类型为写请求的类型时,判断所述rbd-nbd进程中的缓存是否为空;The first determining unit is configured to determine whether the cache in the rbd-nbd process is empty if the type of the read-write snapshot request is the type of the write request;
第一获取单元,用于若所述rbd-nbd进程中的缓存不为空,则获取所述写请求中携带的第一键值,其中,所述第一键值中包括写位置以及写长度信息;The first obtaining unit is configured to obtain a first key value carried in the write request if the cache in the rbd-nbd process is not empty, wherein the first key value includes a write position and a write length information;
比对单元,用于将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对;A comparison unit, configured to compare the first key value with the second key value in the cached entry in the cache;
增加单元,用于若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。The adding unit is configured to add a new cache entry in the cache if the first key value is less than or equal to the second key value, and store the requested content of the write request in the new cache entry.
可选地,所述所述写模块包括:Optionally, the writing module includes:
创建单元,用于若所述rbd-nbd进程中的缓存为空时,将在所述缓存中创建初始条目;A creation unit, configured to create an initial entry in the cache if the cache in the rbd-nbd process is empty;
第一存储单元,用于将所述写请求的请求内容存储在rbd-nbd进程中的初始条目中。The first storage unit is configured to store the request content of the write request in the initial entry in the rbd-nbd process.
可选地,所述所述写模块还包括:Optionally, the writing module further includes:
第二存储单元,用于若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并并存储。The second storage unit is configured to merge and merge the request content of the write request corresponding to the first key value and the request content corresponding to the second key if the first key value is greater than the second key value storage.
可选地,所述网络块设备快照读写装置还包括:Optionally, the apparatus for reading and writing a snapshot of a network block device further includes:
启动模块,用于若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The startup module is used to feed back the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request to the network block device if the type of the read-write snapshot request is a read type, so as to start the network block device Snapshot database in.
可选地,所述启动模块包括:Optionally, the startup module includes:
第二判断单元,用于若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;The second determining unit is configured to determine whether the cache in the rbd-nbd process is empty if the type of the read-write snapshot request is a read type;
第二获取单元,用于若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;The second obtaining unit is configured to obtain the target read key value carried in the read request if the cache in the rbd-nbd process is not empty, and obtain the target read key value from the cache according to the target read key value. Read data of the read request;
反馈单元,用于将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The feedback unit is configured to feed back the snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request to the network block device.
此外,为实现上述目的,本申请还提供一种网络块设备快照读写设备,所述网络块设备快照读写设备包括:存储器、处理器,通信总线以及存储在所述存储器上的网络块设备快照读写方法可读指令,In addition, in order to achieve the above object, this application also provides a network block device snapshot read-write device, the network block device snapshot read-write device includes: a memory, a processor, a communication bus, and a network block device stored on the memory Readable instructions for snapshot read and write methods,
所述通信总线用于实现处理器与存储器间的通信连接;The communication bus is used to realize the communication connection between the processor and the memory;
所述处理器用于执行所述网络块设备快照读写方法可读指令,以实现以下步骤:The processor is configured to execute the readable instructions of the network block device snapshot read and write method to implement the following steps:
在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
获取所述读写快照请求的类型;Acquiring the type of the read-write snapshot request;
若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;If the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
此外,为实现上述目的,本申请还提供一种存储介质,所述存储介质存储有一个或者一个以上可读指令,所述一个或者一个以上可读指令可被一个或者一个以上的处理器执行以用于:In addition, in order to achieve the above object, the present application also provides a storage medium that stores one or more readable instructions, and the one or more readable instructions can be executed by one or more processors to Used for:
在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
获取所述读写快照请求的类型;Acquiring the type of the read-write snapshot request;
若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;If the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
本申请通过在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;获取所述读写快照请求的类型;若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。在本申请中,在检测到网络块设备的读写快照请求时,从Ceph集群获取对应的快照数据,然后获取读写快照请求的类型,若读写快照请求的类型是写类型时,针对写请求中的写内容,设计在rbd-nbd进程中进行并缓存,以便nbd设备检测到该快照数据以及写请求对应的写数据,以便基于该快照数据以及写请求对应的写数据,进行nbd设备的可写快照文件系统,或者可写快照数据库系统的创建,因而解决了现有技术中难以满足创建nbd设备的可写快照文件系统,或者可写快照数据库系统的技术问题。This application sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device when the Ceph client detects the read and write snapshot request to the snapshot database of the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request; obtain the type of the read-write snapshot request; if the type of the read-write snapshot request is a write request type, the type of A write operation is performed in the rbd-nbd process to obtain write data; the write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device. In this application, when a read-write snapshot request of a network block device is detected, the corresponding snapshot data is obtained from the Ceph cluster, and then the type of the read-write snapshot request is obtained. If the type of the read-write snapshot request is the write type, the write The write content in the request is designed to be carried out and cached in the rbd-nbd process, so that the nbd device can detect the snapshot data and the write data corresponding to the write request, so that the nbd device can be processed based on the snapshot data and the write data corresponding to the write request. The creation of a writable snapshot file system, or a writable snapshot database system, thus solves the technical problem of creating a writable snapshot file system of an nbd device or a writable snapshot database system in the prior art.
附图说明Description of the drawings
图1为本申请网络块设备快照读写方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a method for reading and writing a snapshot of a network block device according to the application;
图2为本申请网络块设备快照读写方法第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of a method for reading and writing a snapshot of a network block device according to the application;
图3是本申请实施例方法涉及的硬件运行环境的设备结构示意图。FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the method of the embodiment of the present application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional characteristics and advantages of the application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application.
本申请提供一种网络块设备快照读写方法,在本申请网络块设备快照读写方法的第一实施例中,参照图1,所述网络块设备快照读写方法应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写方法包括:This application provides a method for reading and writing a snapshot of a network block device. In the first embodiment of the method for reading and writing a snapshot of a network block device according to this application, referring to FIG. 1, the method for reading and writing a snapshot of the network block device is applied to a Ceph distributed system The Ceph distributed system also includes a Ceph cluster, and the network block device snapshot read-write method includes:
步骤S10,在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;Step S10, when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
步骤S20,获取所述读写快照请求的类型;Step S20, acquiring the type of the read-write snapshot request;
步骤S30,若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;Step S30, if the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
步骤S40,将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。Step S40, feeding back the write data and the snapshot data to the network block device to activate the snapshot database in the network block device.
具体步骤如下:Specific steps are as follows:
步骤S10,在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;Step S10, when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
需要说明的是,在本实施例中,Ceph分布式系统包括Ceph客户端,所述Ceph分布式系统还包括Ceph集群,在本实施例中,实现在Ceph客户端将Ceph集群中数据内容通过映射网络驱动映射到本地也即Ceph客户端,实现在Ceph客户端将Ceph集群中数据内容通过映射网络驱动映射到本地(Ceph客户端),则需要先由Ceph客户端通过人为方式触发rbd-nbd进程,其中,该rbd-nbd进程连接的两端分别为Ceph客户端以及Ceph集群,人为方式触发rbd-nbd进程即是由用户手动的在Ceph客户端进行Ceph集群的选取,以及本地磁盘的选取,在选取完成后,通过点击等操作即创建了rbd-nbd进程,在确定创建了rbd-nbd进程后,基于该rbd-nbd进程在Ceph客户端本地磁盘中创建nbd设备,在创建该nbd设备后,用户可以实现将Ceph集群的数据读取或者写至本地的nbd设备中,以完成对本地的nbd设备的读写,换种方式,也即实现在Ceph客户端nbd设备上的读写需要转换为对Ceph集群中rbd设备的读写,在Ceph集群中rbd设备的读写完成后,获取rbd设备的读写内容,返回给Ceph客户端nbd设备,以完成对Ceph客户端nbd设备的读写。It should be noted that, in this embodiment, the Ceph distributed system includes a Ceph client, and the Ceph distributed system also includes a Ceph cluster. In this embodiment, the data content in the Ceph cluster is mapped to the Ceph client. The network driver is mapped to the local, that is, the Ceph client. To achieve the Ceph client mapping the data content in the Ceph cluster to the local (Ceph client) through the mapped network driver, the rbd-nbd process needs to be artificially triggered by the Ceph client first Among them, the two ends of the rbd-nbd process connection are the Ceph client and the Ceph cluster respectively. Triggering the rbd-nbd process manually is to manually select the Ceph cluster and the local disk on the Ceph client by the user. After the selection is completed, the rbd-nbd process is created by clicking and other operations. After the rbd-nbd process is determined to be created, the nbd device is created in the local disk of the Ceph client based on the rbd-nbd process. After the nbd device is created , The user can read or write the data of the Ceph cluster to the local nbd device to complete the reading and writing of the local nbd device. In other words, the read and write on the Ceph client nbd device needs to be converted. In order to read and write to the rbd device in the Ceph cluster, after the read and write of the rbd device in the Ceph cluster is completed, the read and write content of the rbd device is obtained and returned to the Ceph client nbd device to complete the read and write to the Ceph client nbd device .
为了便于理解,可以将Ceph集群当作网上邻居设备,若要在本地实现将网上邻居设备中的数据内容读取至本地,则需要首先由用户确定网上邻居设备地址以及本地磁盘,在确定网上邻居设备地址以及本地磁盘后,然后触发rbd-nbd进程,根据该rbd-nbd进程,在本地磁盘中创建nbd设备,并基于该rbd-nbd进程,从网上邻居中获取对应的内容,将该对应的内容存储在nbd设备中,以确定完成该nbd设备的读写。In order to facilitate understanding, the Ceph cluster can be regarded as a network neighbor device. If you want to read the data content of the network neighbor device locally, you need to first determine the network neighbor device address and local disk by the user. After the device address and the local disk, the rbd-nbd process is then triggered. According to the rbd-nbd process, the nbd device is created in the local disk, and based on the rbd-nbd process, the corresponding content is obtained from the network neighbor, and the corresponding The content is stored in the nbd device to determine the completion of the reading and writing of the nbd device.
在创建完成网络块设备后,若在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据,具体地,在检测到读写快照请求时,网络块设备对应的驱动会获取该读写快照请求,然后把该读写快照请求转发给Ceph客户端中的socket结构,该socket结构连接的是rbd-nbd进程与nbd设备,rbd-nbd进程从socket结构中获取该读写快照请求,然后把读写快照请求发送给Ceph集群,Ceph集群在得到该读写快照请求后,会基于该读写快照请求中的读请求返回快照数据,需要说明的是,在本实施例中,rbd-nbd进程的一端是Ceph集群的rbd设备的快照卷,也即由于该rbd-nbd进程的一端是Ceph集群的rbd设备的快照卷,才会存在本申请中的技术问题。After the network block device is created, if the Ceph client detects a read-write snapshot request to the snapshot database of the network block device, the read-write snapshot request is sent based on the rbd-nbd process corresponding to the network block device To the Ceph cluster to obtain the snapshot data fed back by the Ceph cluster for the read-write snapshot request. Specifically, when a read-write snapshot request is detected, the driver corresponding to the network block device will obtain the read-write snapshot request, Then forward the read-write snapshot request to the socket structure in the Ceph client. The socket structure connects the rbd-nbd process and the nbd device. The rbd-nbd process obtains the read-write snapshot request from the socket structure, and then reads and writes The snapshot request is sent to the Ceph cluster. After receiving the read-write snapshot request, the Ceph cluster will return the snapshot data based on the read request in the read-write snapshot request. It should be noted that in this embodiment, one end of the rbd-nbd process It is the snapshot volume of the rbd device of the Ceph cluster, that is, because one end of the rbd-nbd process is the snapshot volume of the rbd device of the Ceph cluster, the technical problem in this application will exist.
Ceph集群在得到该读写快照请求后,会基于该读写快照请求中的读请求返回快照数据过程包括:Ceph集群解析读写快照请求的读请求内容,根据该读请求内容进行快照数据的返回,需要说明的是,Ceph集群基于读请求内容进行快照数据的返回进行返回属于现有技术,并不做具体的说明。After the Ceph cluster receives the read-write snapshot request, it will return the snapshot data based on the read request in the read-write snapshot request. The process includes: Ceph cluster parses the read request content of the read-write snapshot request, and returns the snapshot data according to the read request content It should be noted that the Ceph cluster returns the snapshot data based on the content of the read request, which belongs to the prior art and does not make a specific description.
步骤S20,获取所述读写快照请求的类型;Step S20, acquiring the type of the read-write snapshot request;
在得到快照数据后,再进行读写快照请求的类型的确定,确定读写快照请求的类型的目的在于确定是否需要进行写操作。After obtaining the snapshot data, the type of the read-write snapshot request is determined. The purpose of determining the type of the read-write snapshot request is to determine whether a write operation is required.
如果读写快照请求的类型是读类型,则不需要进行写操作;If the type of read and write snapshot request is read, no write operation is required;
如果读写快照请求的类型是写类型,则需要进行写操作。If the type of the read-write snapshot request is a write type, a write operation is required.
步骤S30,若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;Step S30, if the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
需要说明的是,若所述读写快照请求的类型为写请求类型时,则需要进行写操作,在本实施例中,设计在rbd-nbd进程中进行写操作,以完成读写快照请求的写请求,也即在本实施例中,只要确定所述读写快照请求的类型为写请求类型,则在本地的rbd-nbd进程中开辟临时的缓存进行写操作,以得到写数据。It should be noted that if the type of the read-write snapshot request is a write request type, a write operation is required. In this embodiment, the write operation is designed in the rbd-nbd process to complete the read-write snapshot request Write request, that is, in this embodiment, as long as it is determined that the type of the read-write snapshot request is a write request type, a temporary cache is opened in the local rbd-nbd process to perform a write operation to obtain write data.
具体地,参照图2,所述若所述读写快照请求的类型为写类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据步骤包括:Specifically, referring to FIG. 2, if the type of the read-write snapshot request is a write type, performing a write operation in the rbd-nbd process according to the write type to obtain write data includes:
步骤S31,若所述读写快照请求的类型为写请求的类型时,判断所述rbd-nbd进程中的缓存是否为空;Step S31, if the type of the read-write snapshot request is the type of the write request, determine whether the cache in the rbd-nbd process is empty;
在本实施例中,rbd-nbd进程中的缓存可能存在在先写数据,例如,之前对nbd设备进行写操作后,发现该写操作的内容存在错误,需要进行重新的写操作,此时,存在错误的写操作的在先写数据存在于rbd-nbd进程中,重新的写操作对应进行时需要判断所述rbd-nbd进程中的缓存是否为空。In this embodiment, the cache in the rbd-nbd process may have previously written data. For example, after a previous write operation to the nbd device, it is found that there is an error in the content of the write operation, and a new write operation is required. At this time, The previously written data of the erroneous write operation exists in the rbd-nbd process, and it is necessary to determine whether the cache in the rbd-nbd process is empty when the re-write operation is correspondingly performed.
步骤S32,若所述rbd-nbd进程中的缓存不为空,则获取所述写请求中携带的第一键值,其中,所述第一键值中包括写位置以及写长度信息;Step S32, if the cache in the rbd-nbd process is not empty, obtain a first key value carried in the write request, where the first key value includes write position and write length information;
若所述rbd-nbd进程中的缓存不为空,则存在对应的在先写数据,此时,获取所述写请求中携带的第一键值与写内容,其中,所述第一键值中包括写位置以及写长度信息,写内容还包括待写数据,其中,第一键值中包括写位置以及写长度信息,也即,KEY=offset+len。If the cache in the rbd-nbd process is not empty, there is corresponding prior write data. At this time, the first key value and the write content carried in the write request are acquired, where the first key value It includes writing position and writing length information, and the writing content also includes data to be written. The first key value includes writing position and writing length information, that is, KEY=offset+len.
步骤S33,将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对;Step S33, comparing the first key value with the second key value in the cached entry in the cache;
在得到第一键值后,将所述将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对,将第一键值中的写位置与所述第二键值中的写位置进行比对,若第一键值中的写位置与所述第二键值中的写位置或者写长度不同,则不进行后续写内容的比较,若将第一键值中的写位置与所述第二键值中的写位置或者写长度相同,则将写请求中的写内容与所述第二键值对应中的写内容进行比对。After the first key value is obtained, the first key value is compared with the second key value in the cached entry in the cache, and the write position in the first key value is compared with the second key value. The writing position in the key value is compared. If the writing position in the first key value is different from the writing position or the writing length in the second key value, then no subsequent writing content comparison is performed. If the first key value is compared The write position in is the same as the write position or the write length in the second key value, then the write content in the write request is compared with the write content in the corresponding second key value.
步骤S34,若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。Step S34: If the first key value is less than or equal to the second key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
若第一键值中的写位置与所述第二键值中的写位置或者写长度不同,则所述第一键值小于等于第二键值,若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。If the write position in the first key value is different from the write position or write length in the second key value, the first key value is less than or equal to the second key value, and if the first key value is less than or equal to the second key value Key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
所述判断所述rbd-nbd进程中的缓存是否为空步骤之后包括:After the step of judging whether the cache in the rbd-nbd process is empty includes:
步骤S35,若所述rbd-nbd进程中的缓存为空时,将在所述缓存中创建初始条目;Step S35, if the cache in the rbd-nbd process is empty, an initial entry will be created in the cache;
步骤S36,将所述写请求的请求内容存储在rbd-nbd进程中的初始条目中。Step S36: Store the request content of the write request in the initial entry in the rbd-nbd process.
在本实施例中,若所述rbd-nbd进程中的缓存为空时,将在所述缓存中创建初始条目,将所述写请求的请求内容存储在rbd-nbd进程中的初始条目中,以在本地完成写操作,以得到写数据。In this embodiment, if the cache in the rbd-nbd process is empty, an initial entry will be created in the cache, and the request content of the write request will be stored in the initial entry in the rbd-nbd process, In order to complete the write operation locally to obtain the write data.
步骤S40,将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。Step S40, feeding back the write data and the snapshot data to the network block device to activate the snapshot database in the network block device.
在得到写数据以及所述快照数据后,将写数据以及所述快照数据反馈给所述网络块设备,该网络块设备检测到该基于写请求对应的写数据以及所述快照数据,进行所述网络块设备中的快照数据的启动,也即在nbd设备中检测到了写请求对应的写数据,即可进行快照数据库的启动。After obtaining the write data and the snapshot data, the write data and the snapshot data are fed back to the network block device, the network block device detects the write data and the snapshot data corresponding to the write request, and performs the The snapshot data in the network block device is started, that is, when the write data corresponding to the write request is detected in the nbd device, the snapshot database can be started.
本申请通过在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;获取所述读写快照请求的类型;若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。在本申请中,在检测到网络块设备的读写快照请求时,从Ceph集群获取对应的快照数据,然后获取读写快照请求的类型,若读写快照请求的类型是写类型时,针对写请求中的写内容,设计在rbd-nbd进程中进行并缓存,以便nbd设备检测到该快照数据以及写请求对应的写数据,以便基于该快照数据以及写请求对应的写数据,进行nbd设备的可写快照文件系统,或者可写快照数据库系统的创建,因而解决了现有技术中难以满足创建nbd设备的可写快照文件系统,或者可写快照数据库系统的技术问题。This application sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device when the Ceph client detects the read and write snapshot request to the snapshot database of the network block device, To obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request; obtain the type of the read-write snapshot request; if the type of the read-write snapshot request is a write request type, the type of A write operation is performed in the rbd-nbd process to obtain write data; the write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device. In this application, when a read-write snapshot request of a network block device is detected, the corresponding snapshot data is obtained from the Ceph cluster, and then the type of the read-write snapshot request is obtained. If the type of the read-write snapshot request is the write type, the write The write content in the request is designed to be carried out and cached in the rbd-nbd process, so that the nbd device can detect the snapshot data and the write data corresponding to the write request, so that the nbd device can be processed based on the snapshot data and the write data corresponding to the write request. The creation of a writable snapshot file system, or a writable snapshot database system, thus solves the technical problem of creating a writable snapshot file system of an nbd device or a writable snapshot database system in the prior art.
进一步地,本申请提供网络块设备快照读写方法的另一实施例,在该实施例中,所述将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对步骤之后包括:Further, the present application provides another embodiment of a method for reading and writing a snapshot of a network block device. In this embodiment, the first key value is compared with the second key value in the cached entry in the cache. After the steps include:
步骤S37,若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并存储。Step S37: If the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored.
在本实施例中,若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并存储,合并存储指的是将第一键值对应的写内容与第二键值对应的写内容中的不同部分进行写存储保存,第二键值对应的写内容中的错误内容进行移除,第一键值对应的写内容与第二键值对应的写内容中的相同部分不做处理。In this embodiment, if the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored. Merged storage refers to writing and storing different parts of the writing content corresponding to the first key value and the writing content corresponding to the second key value, and removing the wrong content in the writing content corresponding to the second key value. The same part of the writing content corresponding to the key value and the writing content corresponding to the second key value is not processed.
在本实施例中,若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并存储,确定写操作的正确性。In this embodiment, if the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored. Determine the correctness of the write operation.
进一步地,本申请提供网络块设备快照读写方法的另一实施例,在该实施例中,所述获取所述读写快照请求的类型步骤之后包括:Further, this application provides another embodiment of a method for reading and writing a snapshot of a network block device. In this embodiment, the step of obtaining the type of the read and write snapshot request includes:
步骤A1,若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。Step A1: If the type of the read-write snapshot request is the read type, the snapshot data fed back by the Ceph cluster for the read-write snapshot request is fed back to the network block device to start the network block device Snapshot the database.
在本实施例中,若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库,也即对于读请求,直接进行快照数据的返回即可。In this embodiment, if the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster for the read-write snapshot request is fed back to the network block device to start the network block The snapshot database in the device, that is, for the read request, the snapshot data can be returned directly.
所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:If the type of the read-write snapshot request is a read type, the step of feeding back the snapshot data fed back by the Ceph cluster for the read-write snapshot request to the network block device includes:
步骤B1,若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;Step B1, if the type of the read-write snapshot request is a read type, it is determined whether the cache in the rbd-nbd process is empty;
在本实施例中,若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空,判断该rbd-nbd进程中的缓存是否为空的目的在于,判断该度请求对应的nbd设备是否之前在rbd-nbd进程中存在对应的读数据。In this embodiment, if the type of the read-write snapshot request is a read type, it is determined whether the cache in the rbd-nbd process is empty, and the purpose of determining whether the cache in the rbd-nbd process is empty is to: Determine whether the nbd device corresponding to the degree request has corresponding read data in the rbd-nbd process before.
步骤B2,若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;Step B2: If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read request of the read request from the cache according to the target read key value. data;
若所述rbd-nbd进程中的缓存不为空,则获取对应的读数据,具体地,所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据,If the cache in the rbd-nbd process is not empty, the corresponding read data is obtained. Specifically, the target read key value carried in the read request is obtained from the cache according to the target read key value. Read the requested read data,
步骤B3,将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。Step B3, feeding back the snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request to the network block device.
在得到读数据后,将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。After the read data is obtained, the snapshot data fed back by the Ceph cluster for the read-write snapshot request and the read data are fed back to the network block device.
其中,所述若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空步骤之后还包括:Wherein, if the type of the read-write snapshot request is a read type, after the step of judging whether the cache in the rbd-nbd process is empty, the method further includes:
若所述rbd-nbd进程中的缓存为空,则将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备即可。If the cache in the rbd-nbd process is empty, the snapshot data fed back by the Ceph cluster for the read-write snapshot request can be fed back to the network block device.
在本实施例中,若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备,本实施例中实现对nbd的读请求。In this embodiment, if the type of the read-write snapshot request is the read type, it is determined whether the cache in the rbd-nbd process is empty; if the cache in the rbd-nbd process is not empty, then obtain The target read key value carried in the read request, the read data of the read request is obtained from the cache according to the target read key value; the snapshot data fed back by the Ceph cluster for the read and write snapshot request is compared with The read data is fed back to the network block device, and a read request to nbd is implemented in this embodiment.
参照图3,图3是本申请实施例方案涉及的硬件运行环境的设备结构示意图。Referring to FIG. 3, FIG. 3 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
本申请实施例网络块设备快照读写设备可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等终端设备。The snapshot reading and writing device of the network block device in the embodiment of this application can be a PC, a smart phone, a tablet computer, an e-book reader, MP3 (Moving Picture Experts Group Audio Layer III, moving picture experts compress standard audio layer 3) player, MP4 (Moving Picture Experts) Group Audio Layer IV, dynamic image experts compress standard audio layer 3) Players, portable computers and other terminal equipment.
如图3所示,该网络块设备快照读写设备可以包括:处理器1001,例如CPU,存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。As shown in FIG. 3, the network block device snapshot read-write device may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection and communication between the processor 1001 and the memory 1005. The memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as disk storage. Optionally, the memory 1005 may also be a storage device independent of the foregoing processor 1001.
可选地,该网络块设备快照读写设备还可以包括目标用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。目标用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选目标用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Optionally, the network block device snapshot read-write device may also include a target user interface, network interface, camera, RF (Radio Frequency (radio frequency) circuits, sensors, audio circuits, WiFi modules, etc. The target user interface may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional target user interface may also include a standard wired interface and a wireless interface. The optional network interface can include standard wired interface and wireless interface (such as WI-FI interface).
本领域技术人员可以理解,图3中示出的网络块设备快照读写设备结构并不构成对网络块设备快照读写设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the network block device snapshot read-write device structure shown in FIG. 3 does not constitute a limitation on the network block device snapshot read-write device, and may include more or less components than shown in the figure, or a combination Certain components, or different component arrangements.
如图3所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块以及网络块设备快照读写方法可读指令。操作系统是管理和控制网络块设备快照读写设备硬件和软件资源的可读指令,支持网络块设备快照读写方法可读指令以及其它软件和/或可读指令的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与网络块设备快照读写设备中其它硬件和软件之间通信。As shown in FIG. 3, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and readable instructions for a network block device snapshot reading and writing method. The operating system is a readable instruction for managing and controlling the hardware and software resources of the network block device snapshot reading and writing device, and supports the operation of the network block device snapshot reading and writing method readable instructions and other software and/or readable instructions. The network communication module is used to implement communication between various components in the memory 1005, and to communicate with other hardware and software in the network block device snapshot read-write device.
在图3所示的网络块设备快照读写设备中,处理器1001用于执行存储器1005中存储的网络块设备快照读写方法可读指令,实现上述任一项所述的网络块设备快照读写方法的步骤。In the network block device snapshot reading and writing device shown in FIG. 3, the processor 1001 is configured to execute the readable instructions of the network block device snapshot reading and writing method stored in the memory 1005 to implement the network block device snapshot reading described above. Write method steps.
本申请网络块设备快照读写设备具体实施方式与上述网络块设备快照读写方法各实施例基本相同,在此不再赘述。The specific implementation of the network block device snapshot read-write device of this application is basically the same as the foregoing embodiments of the network block device snapshot read-write method, and will not be repeated here.
本申请还提供一种网络块设备快照读写装置,所述网络块设备快照读写装置应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写装置包括:This application also provides a network block device snapshot reading and writing device, the network block device snapshot reading and writing device is applied to a Ceph client in a Ceph distributed system, the Ceph distributed system also includes a Ceph cluster, and the network block The device snapshot reading and writing device includes:
检测模块,用于在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;The detection module is used to send the read and write snapshot request to the Ceph based on the rbd-nbd process corresponding to the network block device when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device Cluster to obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
获取模块,用于获取所述读写快照请求的类型;An obtaining module, used to obtain the type of the read-write snapshot request;
写模块,用于若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;A write module, configured to perform a write operation in the rbd-nbd process according to the write type when the type of the read-write snapshot request is a write request type to obtain write data;
反馈模块,用于将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The feedback module is used to feed back the write data and the snapshot data to the network block device to start the snapshot database in the network block device.
本申请网络块设备快照读写装置具体实施方式与上述网络块设备快照读写方法各实施例基本相同,在此不再赘述。The specific implementation of the network block device snapshot reading and writing apparatus of the present application is basically the same as the foregoing embodiments of the network block device snapshot reading and writing method, and will not be repeated here.
本申请提供了一种存储介质,所述存储介质可以为非易失性可读存储介质,所述存储介质存储有一个或者一个以上可读指令,所述一个或者一个以上可读指令还可被一个或者一个以上的处理器执行以用于实现上述任一项所述的网络块设备快照读写方法的步骤。The present application provides a storage medium, the storage medium may be a non-volatile readable storage medium, the storage medium stores one or more readable instructions, the one or more readable instructions may also be One or more processors are executed to implement the steps of the network block device snapshot reading and writing method described above.
本申请存储介质具体实施方式与上述网络块设备快照读写方法各实施例基本相同,在此不再赘述。The specific implementation of the storage medium of the present application is basically the same as the foregoing embodiments of the network block device snapshot reading and writing method, and will not be repeated here.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利处理范围内。The above are only preferred embodiments of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields , The same reason is included in the scope of patent processing of this application.

Claims (20)

  1. 一种网络块设备快照读写方法,其特征在于,所述网络块设备快照读写方法应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写方法包括: A method for reading and writing a snapshot of a network block device is characterized in that the method for reading and writing a snapshot of a network block device is applied to a Ceph client in a Ceph distributed system. The Ceph distributed system also includes a Ceph cluster. The network block Device snapshot read and write methods include:
    在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;When the Ceph client detects a read and write snapshot request for the snapshot database of the network block device, it sends the read and write snapshot request to the Ceph cluster based on the rbd-nbd process corresponding to the network block device to obtain all The snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
    获取所述读写快照请求的类型;Acquiring the type of the read-write snapshot request;
    若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;If the type of the read-write snapshot request is a write request type, perform a write operation in the rbd-nbd process according to the write type to obtain write data;
    将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The write data and the snapshot data are fed back to the network block device to start the snapshot database in the network block device.
  2. 如权利要求1所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为写类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据步骤包括:The method for reading and writing a snapshot of a network block device according to claim 1, wherein if the type of the read and write snapshot request is a write type, writing is performed in the rbd-nbd process according to the write type. The operation to obtain the write data includes:
    若所述读写快照请求的类型为写请求的类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is the type of the write request, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述写请求中携带的第一键值,其中,所述第一键值中包括写位置以及写长度信息;If the cache in the rbd-nbd process is not empty, acquire the first key value carried in the write request, where the first key value includes write position and write length information;
    将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对;Comparing the first key value with the second key value in the cached entry in the cache;
    若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。If the first key value is less than or equal to the second key value, a new cache entry is added to the cache, and the requested content of the write request is stored in the new cache entry.
  3. 如权利要求2所述的网络块设备快照读写方法,其特征在于,所述获取所述读写快照请求的类型步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 2, wherein after the step of obtaining the type of the read and write snapshot request includes:
    若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。If the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
  4. 如权利要求2所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:The method for reading and writing a snapshot of a network block device according to claim 2, wherein if the type of the read-write snapshot request is a read type, the Ceph cluster responds to the snapshot of the read-write snapshot request The step of feeding back data to the network block device includes:
    若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
    将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  5. 如权利要求2所述的网络块设备快照读写方法,其特征在于,所述判断所述rbd-nbd进程中的缓存是否为空步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 2, wherein after the step of judging whether the cache in the rbd-nbd process is empty comprises:
    若所述rbd-nbd进程中的缓存为空时,将在所述缓存中创建初始条目;If the cache in the rbd-nbd process is empty, an initial entry will be created in the cache;
    将所述写请求的请求内容存储在rbd-nbd进程中的初始条目中。The request content of the write request is stored in the initial entry in the rbd-nbd process.
  6. 如权利要求5所述的网络块设备快照读写方法,其特征在于,所述获取所述读写快照请求的类型步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 5, wherein after the step of obtaining the type of the read and write snapshot request comprises:
    若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。If the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
  7. 如权利要求5所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:The method for reading and writing a snapshot of a network block device according to claim 5, wherein if the type of the read-write snapshot request is a read type, the Ceph cluster responds to the snapshot of the read-write snapshot request The step of feeding back data to the network block device includes:
    若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
    将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  8. 如权利要求2所述的网络块设备快照读写方法,其特征在于,所述将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 2, wherein after the step of comparing the first key value with the second key value in the cached entry in the cache, the step comprises:
    若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并存储。If the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored.
  9. 如权利要求8所述的网络块设备快照读写方法,其特征在于,所述将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对步骤之后包括:8. The method for reading and writing a snapshot of a network block device according to claim 8, wherein after the step of comparing the first key value with the second key value in the cached entry in the cache, the step comprises:
    若所述第一键值大于所述第二键值,则将所述第一键值对应的写请求的请求内容与所述第二键对应的请求内容进行合并存储。If the first key value is greater than the second key value, the request content of the write request corresponding to the first key value and the request content corresponding to the second key are combined and stored.
  10. 如权利要求8所述的网络块设备快照读写方法,其特征在于,所述获取所述读写快照请求的类型步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 8, wherein after the step of obtaining the type of the read and write snapshot request comprises:
    若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。If the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
  11. 如权利要求8所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:The method for reading and writing a snapshot of a network block device according to claim 8, wherein if the type of the read-write snapshot request is a read type, the Ceph cluster responds to the snapshot of the read-write snapshot request The step of feeding back data to the network block device includes:
    若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
    将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  12. 如权利要求1所述的网络块设备快照读写方法,其特征在于,所述获取所述读写快照请求的类型步骤之后包括:The method for reading and writing a snapshot of a network block device according to claim 1, wherein after the step of obtaining the type of the read and write snapshot request, the method comprises:
    若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。If the type of the read-write snapshot request is a read type, the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request is fed back to the network block device to start the snapshot database in the network block device.
  13. 如权利要求12所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:The method for reading and writing a snapshot of a network block device according to claim 12, wherein if the type of the read-write snapshot request is a read type, the Ceph cluster responds to the snapshot of the read-write snapshot request The step of feeding back data to the network block device includes:
    若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
    将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  14. 如权利要求1所述的网络块设备快照读写方法,其特征在于,所述若所述读写快照请求的类型为读类型时,将所述Ceph集群针对所述读写快照请求反馈的快照数据反馈给所述网络块设备步骤包括:The method for reading and writing a snapshot of a network block device according to claim 1, wherein if the type of the read-write snapshot request is a read type, the Ceph cluster responds to the snapshot of the read-write snapshot request The step of feeding back data to the network block device includes:
    若所述读写快照请求的类型为读类型时,判断所述rbd-nbd进程中的缓存是否为空;If the type of the read-write snapshot request is a read type, determining whether the cache in the rbd-nbd process is empty;
    若所述rbd-nbd进程中的缓存不为空,则获取所述读请求中携带的目标读键值,根据所述目标读键值从所述缓存中获取所述读请求的读数据;If the cache in the rbd-nbd process is not empty, obtain the target read key value carried in the read request, and obtain the read data of the read request from the cache according to the target read key value;
    将所述Ceph集群针对所述读写快照请求反馈的快照数据与所述读数据反馈给所述网络块设备。The snapshot data and the read data fed back by the Ceph cluster for the read-write snapshot request are fed back to the network block device.
  15. 一种网络块设备快照读写装置,其特征在于,所述网络块设备快照读写装置应用于Ceph分布式系统中的Ceph客户端,所述Ceph分布式系统还包括Ceph集群,所述网络块设备快照读写装置包括:A network block device snapshot reading and writing device, characterized in that the network block device snapshot reading and writing device is applied to a Ceph client in a Ceph distributed system, the Ceph distributed system also includes a Ceph cluster, and the network block The device snapshot reading and writing device includes:
    检测模块,用于在Ceph客户端检测到对网络块设备的快照数据库的读写快照请求时,基于所述网络块设备对应的rbd-nbd进程,将所述读写快照请求发送给所述Ceph集群,以获取所述Ceph集群针对所述读写快照请求反馈的快照数据;The detection module is used to send the read and write snapshot request to the Ceph based on the rbd-nbd process corresponding to the network block device when the Ceph client detects a read and write snapshot request to the snapshot database of the network block device Cluster to obtain the snapshot data fed back by the Ceph cluster in response to the read-write snapshot request;
    获取模块,用于获取所述读写快照请求的类型;An obtaining module, used to obtain the type of the read-write snapshot request;
    写模块,用于若所述读写快照请求的类型为写请求类型时,根据所述写类型在所述rbd-nbd进程中进行写操作,以得到写数据;A write module, configured to perform a write operation in the rbd-nbd process according to the write type when the type of the read-write snapshot request is a write request type to obtain write data;
    反馈模块,用于将所述写数据以及所述快照数据反馈给所述网络块设备,以启动所述网络块设备中的快照数据库。The feedback module is used to feed back the write data and the snapshot data to the network block device to start the snapshot database in the network block device.
  16. 如权利要求15所述的网络块设备快照读写装置,其特征在于,所述写模块包括:The device for reading and writing a snapshot of a network block device according to claim 15, wherein the writing module comprises:
    第一判断单元,用于若所述读写快照请求的类型为写请求的类型时,判断所述rbd-nbd进程中的缓存是否为空;The first determining unit is configured to determine whether the cache in the rbd-nbd process is empty if the type of the read-write snapshot request is the type of the write request;
    第一获取单元,用于若所述rbd-nbd进程中的缓存不为空,则获取所述写请求中携带的第一键值,其中,所述第一键值中包括写位置以及写长度信息;The first obtaining unit is configured to obtain a first key value carried in the write request if the cache in the rbd-nbd process is not empty, wherein the first key value includes a write position and a write length information;
    比对单元,用于将所述第一键值与所述缓存中已缓存条目中的第二键值进行比对;A comparison unit, configured to compare the first key value with the second key value in the cached entry in the cache;
    增加单元,用于若所述第一键值小于等于第二键值,则在所述缓存中增加新的缓存条目,将所述写请求的请求内容存储在所述新的缓存条目中。The adding unit is configured to add a new cache entry in the cache if the first key value is less than or equal to the second key value, and store the requested content of the write request in the new cache entry.
  17. 一种网络块设备快照读写设备,其特征在于,所述网络块设备快照读写设备包括:存储器、处理器,通信总线以及存储在所述存储器上的网络块设备快照读写方法可读指令,A network block device snapshot reading and writing device, characterized in that the network block device snapshot reading and writing device includes: a memory, a processor, a communication bus, and a network block device snapshot reading and writing method readable instructions stored on the memory ,
    所述通信总线用于实现处理器与存储器间的通信连接;The communication bus is used to realize the communication connection between the processor and the memory;
    所述处理器用于执行所述网络块设备快照读写方法可读指令,以实现如权利要求1所述的网络块设备快照读写方法的步骤。The processor is configured to execute the readable instructions of the network block device snapshot reading and writing method, so as to realize the steps of the network block device snapshot reading and writing method according to claim 1.
  18. 一种网络块设备快照读写设备,其特征在于,所述网络块设备快照读写设备包括:存储器、处理器,通信总线以及存储在所述存储器上的网络块设备快照读写方法可读指令,A network block device snapshot reading and writing device, characterized in that the network block device snapshot reading and writing device includes: a memory, a processor, a communication bus, and a network block device snapshot reading and writing method readable instructions stored on the memory ,
    所述通信总线用于实现处理器与存储器间的通信连接;The communication bus is used to realize the communication connection between the processor and the memory;
    所述处理器用于执行所述网络块设备快照读写方法可读指令,以实现如权利要求2所述的网络块设备快照读写方法的步骤。The processor is configured to execute the readable instructions of the network block device snapshot reading and writing method to implement the steps of the network block device snapshot reading and writing method according to claim 2.
  19. 一种存储介质,其特征在于,所述存储介质上存储有网络块设备快照读写方法可读指令,所述网络块设备快照读写方法可读指令被处理器执行时实现如权利要求1所述的网络块设备快照读写方法的步骤。A storage medium, wherein the storage medium stores readable instructions of a network block device snapshot read and write method, and the readable instructions of the network block device snapshot read and write method are executed by a processor as described in claim 1. The steps of the network block device snapshot read and write method.
  20. 一种存储介质,其特征在于,所述存储介质上存储有网络块设备快照读写方法可读指令,所述网络块设备快照读写方法可读指令被处理器执行时实现如权利要求2所述的网络块设备快照读写方法的步骤。 A storage medium, wherein the storage medium stores readable instructions of a network block device snapshot reading and writing method, and the readable instructions of the network block device snapshot reading and writing method are implemented as described in claim 2 when executed by a processor. The steps of the network block device snapshot read and write method. To
PCT/CN2019/101713 2019-05-31 2019-08-21 Snapshot read-write method for network block device, apparatus, device, and storage medium WO2020237849A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910480680.4A CN110321321B (en) 2019-05-31 2019-05-31 Snapshot read-write method, device and equipment for network block equipment and storage medium
CN201910480680.4 2019-05-31

Publications (1)

Publication Number Publication Date
WO2020237849A1 true WO2020237849A1 (en) 2020-12-03

Family

ID=68119584

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101713 WO2020237849A1 (en) 2019-05-31 2019-08-21 Snapshot read-write method for network block device, apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN110321321B (en)
WO (1) WO2020237849A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040346A (en) * 2021-09-22 2022-02-11 福建省新天地信勘测有限公司 Archive digital information management system based on 5G network

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143183A (en) * 2019-12-27 2020-05-12 紫光云(南京)数字技术有限公司 Method for testing rbd uploading speed based on librbd library

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110313973A1 (en) * 2010-06-19 2011-12-22 Srivas Mandayam C Map-Reduce Ready Distributed File System
CN107291883A (en) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of distributed memory system
CN109033328A (en) * 2018-07-19 2018-12-18 郑州云海信息技术有限公司 A kind of access request processing method, device, equipment and readable storage medium storing program for executing
CN109814946A (en) * 2018-12-29 2019-05-28 创新科存储技术(深圳)有限公司 A kind of method and apparatus for realizing distributed storage in XenServer

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7617292B2 (en) * 2001-06-05 2009-11-10 Silicon Graphics International Multi-class heterogeneous clients in a clustered filesystem
US7774568B2 (en) * 2007-08-13 2010-08-10 Novell, Inc. Clustered snapshots in networks
CN108460045B (en) * 2017-02-21 2022-11-18 中兴通讯股份有限公司 Snapshot processing method and distributed block storage system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110313973A1 (en) * 2010-06-19 2011-12-22 Srivas Mandayam C Map-Reduce Ready Distributed File System
CN107291883A (en) * 2017-06-20 2017-10-24 郑州云海信息技术有限公司 The Snapshot Method and device of a kind of distributed memory system
CN109033328A (en) * 2018-07-19 2018-12-18 郑州云海信息技术有限公司 A kind of access request processing method, device, equipment and readable storage medium storing program for executing
CN109814946A (en) * 2018-12-29 2019-05-28 创新科存储技术(深圳)有限公司 A kind of method and apparatus for realizing distributed storage in XenServer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG, PENGJIE ET AL.: "Non-official translation: A Continuous Data Protection Method for Ceph Distributed Block Storage", NETWORK SECURITY TECHNOLOGY & APPLICATION, 15 February 2017 (2017-02-15), DOI: 20200106095737A *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040346A (en) * 2021-09-22 2022-02-11 福建省新天地信勘测有限公司 Archive digital information management system based on 5G network
CN114040346B (en) * 2021-09-22 2024-02-06 福建省新天地信勘测有限公司 File digital information management system and management method based on 5G network

Also Published As

Publication number Publication date
CN110321321B (en) 2023-06-23
CN110321321A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
WO2018103315A1 (en) Monitoring data processing method, apparatus, server and storage equipment
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
WO2020125251A1 (en) Federated learning-based model parameter training method, device, apparatus, and medium
WO2020237859A1 (en) Data migration method employing nbd device, apparatus, device, and storage medium
WO2018076865A1 (en) Data sharing method, device, storage medium, and electronic device
WO2018076841A1 (en) Data sharing method, apparatus, storage medium and server
WO2018233352A1 (en) Data transmission method, device, terminal and computer-readable storage medium
WO2014189275A1 (en) Apparatus and method of recognizing external device in a communication system
WO2012055298A1 (en) Offline working method of client and offline working client
WO2021072881A1 (en) Object storage-based request processing method, apparatus and device, and storage medium
WO2018201774A1 (en) Data approval method, apparatus, device, and computer readable storage medium
WO2021051492A1 (en) Database service node switching method, apparatus and device, and computer storage medium
WO2016101441A1 (en) File synchronization method and system
WO2020237849A1 (en) Snapshot read-write method for network block device, apparatus, device, and storage medium
WO2020103275A1 (en) Money deduction control method, apparatus, and device, and readable storage medium
WO2020087981A1 (en) Method and apparatus for generating risk control audit model, device and readable storage medium
WO2019137217A1 (en) Method for page jumping in application program, terminal, and storage medium
WO2017148142A1 (en) Method and apparatus for switching name of desktop icon folder, and electronic device
WO2021027134A1 (en) Data storage method, apparatus and device and computer storage medium
WO2018120680A1 (en) Virtual disk backup system, method, apparatus, service host and storage medium
WO2020062554A1 (en) Data reading method for memory, display apparatus, and computer readable storage medium
WO2012022215A1 (en) Interaction method, device, and system for interactive message on internet
WO2017206879A1 (en) Mobile terminal application program processing method and apparatus, storage medium, and electronic device
WO2016183721A1 (en) Upgrade method, apparatus and device for terminal device
WO2015180434A1 (en) Data management method, node and system for database cluster

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19931185

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19931185

Country of ref document: EP

Kind code of ref document: A1