A data storage method, device, and medium

CN115454339BActive Publication Date: 2026-09-29JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211071560.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2026-09-29
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

而当存储设备发生故障时,多路径的读写方式也会失效,无法进行数据的写入,影响业务进行

Benefits of technology

[0034]本申请所提供的数据存储方法,当检测到原块设备的状态变为只读状态时,调用预留的备用块设备并建立备用块设备的存储路径,在写操作时通过存储路径将数据写入备用块设备,在读操作时优先在原块设备中读取数据,若未读取到数据,则通过存储路径在备用块设备中读取数据。相对于当前技术中,块设备故障后无法进行数据的存储,需要通过反复重启控制器的方式以实现存储的恢复和可用,块设备多路径的切换易导致路径管理混乱和不可用,影响业务的进行。采用本技术方案,预先保留出备用块设备,当原块设备故障时调用备用块设备进行存储,在写数据时直接将数据写入备用块设备,在读数据时优先从原块设备中读取,如果没有读到再从备用块设备中读取。本技术方案通过在原块设备故障时使用备用块设备进行存储,无需进行控制器的重启等操作,实现业务的不间断进行,保障了数据的成功落盘。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454339B_ABST
    Figure CN115454339B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and discloses a data storage method, device and medium. When it is detected that the state of an original block device becomes a read-only state, a reserved backup block device is called and a storage path of the backup block device is established, data is written into the backup block device through the storage path during a write operation, data is read in the original block device during a read operation, and if the data is not read, the data is read in the backup block device through the storage path. According to the technical scheme, the backup block device is reserved in advance, the backup block device is called for storage when the original block device fails, data is directly written into the backup block device during data writing, the data is preferentially read from the original block device during data reading, and if the data is not read, the data is read from the backup block device. According to the technical scheme, the backup block device is used for storage when the original block device fails, and the controller does not need to be restarted, so that uninterrupted business is realized, and the successful landing of data is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data storage method, apparatus, and medium. Background Technology

[0002] With the rapid development of cloud computing, cloud platforms are becoming increasingly mature and systems are growing in scale, leading to higher and higher reliability requirements. The stability of storage devices, in particular, is crucial, and ensuring availability and performance in the event of storage device failure is becoming an increasingly common problem.

[0003] In production environments, data storage availability is typically deployed using a multi-path, multi-site approach. However, when storage devices fail, this multi-path read / write method becomes ineffective, preventing data writing and impacting business operations. Common storage failure resolution strategies typically involve restarting nodes. In cases like hard drive failures, controllers are restarted one by one to ensure storage recovery and availability. However, this method requires switching between block device paths, necessitating frequent path updates on client devices. Besides impacting business operations, this also significantly increases the likelihood of path management chaos and unavailability.

[0004] Therefore, ensuring uninterrupted business operations and successful data write-to-disk is a problem that urgently needs to be solved by those skilled in the art when block devices fail. Summary of the Invention

[0005] The purpose of this application is to provide a data storage method, apparatus, and medium for ensuring uninterrupted business operations and successful data write-to-disk when block devices fail.

[0006] To address the aforementioned technical problems, this application provides a data storage method, comprising:

[0007] When the status of the original block device is detected to change to read-only, the reserved spare block device is invoked and the storage path of the spare block device is established.

[0008] During a write operation, data is written to the spare block device via the storage path;

[0009] During a read operation, data is first read from the original block device. If the data is not read, the data is read from the backup block device through the storage path.

[0010] Preferably, if the state of the original device is restored to a normal read / write state, the method further includes:

[0011] The storage path for the recovered data is the storage path of the original block device.

[0012] Preferably, if the state of the original device is restored to a normal read / write state, the method further includes:

[0013] Move the data from the spare block device to the original block device.

[0014] Preferably, after the step of moving the data from the spare block device to the original block device, the method further includes:

[0015] Delete the storage path of the spare block device.

[0016] Preferably, writing data to the spare block device includes:

[0017] The data is written to the spare block device and a storage tag is attached, the storage tag being used to characterize the storage location of the data in the original block device;

[0018] Furthermore, moving the data in the spare block device to the original block device means: moving the data in the spare block device to the original block device according to the storage tag.

[0019] Preferably, when the state of the original block device is detected to have changed to read-only state, the method further includes:

[0020] Set the storage path of the original block device to read-only.

[0021] Preferably, when the state of the original block device is detected to have changed to read-only, the method further includes sending a prompt signal.

[0022] To address the aforementioned technical problems, this application also provides a data storage device, comprising:

[0023] The calling module is used to call the reserved backup block device and establish the storage path of the backup block device when the state of the original block device is detected to change to read-only state;

[0024] A write data module is used to write data to the spare block device via the storage path during a write operation;

[0025] The data read module is used to prioritize reading data from the original block device during a read operation. If the data is not found, the data is read from the backup block device through the storage path.

[0026] Preferably, it further includes: a recovery module, used to recover data stored in the original block device.

[0027] Preferably, it further includes: a moving module for moving data from the spare block device to the original block device.

[0028] Preferably, it also includes: a deletion module for deleting the storage path of the spare block device.

[0029] Preferably, it further includes: a setting module for setting the storage path of the original block device to read-only.

[0030] Preferably, it also includes: a prompting module for sending prompting signals.

[0031] To address the aforementioned technical problems, this application also provides another data storage device, including a memory for storing computer programs;

[0032] A processor for implementing the data storage method described above when executing the computer program.

[0033] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data storage method described above.

[0034] The data storage method provided in this application, when detecting that the original block device's state has changed to read-only, calls a reserved backup block device and establishes a storage path for the backup block device. During write operations, data is written to the backup block device through the storage path. During read operations, data is first read from the original block device; if the data is not found, it is read from the backup block device through the storage path. Compared to current technologies where data storage is impossible after a block device failure, requiring repeated controller restarts to restore storage availability, and where switching between multiple block device paths can lead to path management chaos and unavailability, impacting business operations, this technical solution pre-reserves a backup block device. When the original block device fails, the backup block device is used for storage. During write operations, data is directly written to the backup block device; during read operations, data is first read from the original block device, and only read from the backup block device if the data is not found there. This technical solution, by using the backup block device for storage when the original block device fails, eliminates the need for controller restarts, ensuring uninterrupted business operations and successful data persistence.

[0035] Furthermore, the data storage device and medium provided in this application correspond to the data storage method described above and have the same effect. Attached Figure Description

[0036] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 A flowchart illustrating a data storage method provided in an embodiment of this application;

[0038] Figure 2 This is a schematic diagram of a multipath storage system in the current technology;

[0039] Figure 3 A structural diagram of a data storage device provided in an embodiment of this application;

[0040] Figure 4 This is a structural diagram of another data storage device provided in an embodiment of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0042] With the rapid development of cloud computing, cloud platforms are becoming increasingly mature and systems are growing in scale, leading to higher and higher reliability requirements. The stability of storage devices, in particular, is crucial, and ensuring availability and performance in the event of storage device failure is becoming an increasingly common problem.

[0043] In production environments, data storage availability is typically deployed using a multi-path, multi-site approach. However, when storage devices fail, this multi-path read / write method becomes ineffective, preventing data writing and impacting business operations. Common storage failure resolution strategies typically involve restarting nodes. In cases like hard drive failures, controllers are restarted one by one to ensure storage recovery and availability. However, this method requires switching between block device paths, necessitating frequent path updates on client devices. Besides impacting business operations, this also significantly increases the likelihood of path management chaos and unavailability.

[0044] Therefore, ensuring uninterrupted business operations and successful data write-to-disk is a problem that urgently needs to be solved by those skilled in the art when block devices fail.

[0045] The core of this application is to provide a data storage method, apparatus, and medium for ensuring uninterrupted business operations and successful data write-to-disk when block devices fail.

[0046] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] Figure 1 A flowchart of a data storage method provided in an embodiment of this application is shown below. Figure 1 As shown, the method includes:

[0048] S10: When the state of the original block device is detected to change to read-only state, the reserved spare block device is invoked and the storage path of the spare block device is established;

[0049] S11: During a write operation, data is written to the standby block device via the storage path;

[0050] S12: During a read operation, data is first read from the original block device. If no data is found, the data is read from the spare block device via the storage path.

[0051] Figure 2 This is a schematic diagram of a multipath storage system in the current technology, such as... Figure 2As shown, in this system, a virtual machine (VM) refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a VM. When creating a VM on a computer, a portion of the physical machine's hard drive and memory capacity is used as the VM's hard drive and memory capacity. Each VM has its own independent CMOS, hard drive, and operating system, and can be operated just like a physical machine. Block devices are a type of I / O device that stores information in fixed-size blocks, each with its own address. Data of a certain length can be read from any location on the device, such as hard drives, USB flash drives, and SD cards. `vdb` is the disk drive letter in the VM; similarly, there are `vda`, `bdc`, etc. libvirt is an open-source API, daemon, and management tool used to manage virtualization platforms and VMs. `dm-x` is a multipath-mapped device provided to libvirt. The multipath daemon (multipathd) checks for failed paths and reconfigures multipath mappings. When an event occurs requiring device mapping reconfiguration, the daemon runs the multipath utility. sdaa, sdab, sdac, etc., represent block device disks, mapped from storage servers to servers. Without multipathd, all paths from server nodes to storage controllers would be treated as independent devices by the system, even I / O paths connecting the same server node to the same storage controller. Multipathd provides a logical method for managing I / O paths, creating a single multipath device on top of the underlying infrastructure. A host bus adapter (HBA) is a circuit board or integrated circuit adapter that provides input / output processing and physical connectivity between the server and storage devices. Because the HBA reduces the burden on the main processor for data storage and retrieval tasks, it can improve server performance.

[0052] It can be seen that, Figure 2 Multipathing is used for volume storage. If one storage link fails while others are functioning normally, virtual machine I / O can still be dispatched normally. However, when the storage device fails, all paths will fail, rendering the multipathed storage system unusable.

[0053] It should be noted that, in specific implementations, the unavailability of a storage system is divided into the read-only state and the offline state of the storage device. In this application, unavailability refers to the target file system becoming read-only. The offline scenario of the storage device is not within the scope of this invention.

[0054] Compared to Figure 2The storage system in this application, as shown in the diagram, includes a primary block device for normal use and a reserved backup block device. When the primary block device is detected to have become read-only, the backup block device is invoked and its storage path is established. Data is written through the backup block device, thus achieving data persistence without interrupting service. When reading data, it is first read from the primary block device; if the data is not found there, it is then read from the backup block device. It is understood that the backup block device in this embodiment ensures data storage when the primary block device is unavailable. Therefore, in practical implementations, the backup block device is typically not used for other purposes; it only ensures successful data persistence when the primary block device becomes read-only.

[0055] In practice, when the status of the original device is detected to change to read-only, the controller can also send a prompt signal to remind technicians to repair the original device and ensure the operation of services.

[0056] In practice, when the original block device is detected to have become read-only, the storage path of the created backup block device should be in normal read-write state. All paths of the original block device should also be set to read-only to avoid read-write path errors after the original block device is restored.

[0057] This technical solution addresses the issue of a primary block device failing and becoming read-only. By deploying a backup block device, data is written to the backup block device during write operations. This ensures the virtual machine remains unaware of the underlying storage failure and can continue providing business services, resolving the problem of the primary block device being unable to write data to disk. When reading data, priority is given to reading from the primary block device; if the data is not found there, it is then read from the backup block device, guaranteeing normal business operations.

[0058] The data storage method provided in this application, when detecting that the original block device's state has changed to read-only, calls a reserved backup block device and establishes a storage path for the backup block device. During write operations, data is written to the backup block device through the storage path. During read operations, data is first read from the original block device; if no data is found, it is read from the backup block device through the storage path. Compared to current technologies where data storage is impossible after a block device failure, requiring repeated controller restarts for storage recovery and availability, and where multi-path switching of block devices can lead to path management chaos and unavailability, impacting business operations, this technical solution pre-reserves a backup block device. When the original block device fails, the backup block device is used for storage. During write operations, data is directly written to the backup block device; during read operations, data is first read from the original block device, and only read from the backup block device if no data is found. This technical solution, by using the backup block device for storage when the original block device fails, eliminates the need for controller restarts, ensuring uninterrupted business operations and successful data persistence.

[0059] When all paths of the original block device are set to read-only, data needs to be written to disk through the storage path of the standby block device. When the original block device is restored to normal read / write status, the data storage path needs to be restored to the storage path of the original block device, and the path of the original block device needs to be restored to normal read / write status to restore the normal operation of the storage system.

[0060] To ensure data persistence for future reuse, once the original block device is repaired, there is no need to deploy a backup block device. The backup block device should be unloaded and its storage path deleted, and the original block device should be used for data reading and writing.

[0061] Before deleting the storage path of the standby block device, in order to ensure the normal operation of the business and avoid data loss, the data in the standby block device should be synchronously moved to the original block device.

[0062] Furthermore, when writing data to the spare block device, a storage tag should be attached, which is used to characterize the storage location of the data in the original block device;

[0063] Correspondingly, moving data from the spare block device to the original block device involves moving the data from the spare block device to the original block device based on the storage tag.

[0064] The data storage method provided in this application embodiment moves the data in the spare block device to the original block device according to the storage mark after the original block device is restored to the normal read / write state, deletes the storage path of the spare block device, and uses the storage path of the original block device to store the data, thereby restoring the normal operation of the storage system.

[0065] In the above embodiments, the data storage method has been described in detail. This application also provides embodiments corresponding to the data storage device. It should be noted that this application describes the embodiments of the device part from two perspectives: one is based on the functional module, and the other is based on the hardware.

[0066] Figure 3 A structural diagram of a data storage device provided in an embodiment of this application is shown below. Figure 3 As shown, the device includes:

[0067] Module 10 is invoked to invoke the reserved backup block device and establish the storage path of the backup block device when the state of the original block device is detected to change to read-only state.

[0068] The write data module 11 is used to write data to the standby block device via the storage path during a write operation;

[0069] The data read module 12 is used to prioritize reading data from the original block device during a read operation. If no data is found, the data is read from the backup block device through the storage path.

[0070] It should be noted that, Figure 3 The structure shown does not constitute a limitation on the data storage device and may include more or fewer components than illustrated. In other embodiments, as a preferred implementation, the data storage device may further include: a recovery module for restoring the data storage path to the storage path of the original block device. When all paths of the original block device are set to read-only attributes, data needs to be written to disk through the storage path of the backup block device. When the state of the original block device is restored to normal read / write state, the data storage path needs to be restored to the storage path of the original block device, and the path of the original block device needs to be restored to normal read / write attributes, thus restoring the normal operation of the storage system.

[0071] Preferably, it further includes a moving module for moving data from the backup block device to the original block device. Before deleting the storage path of the backup block device, in order to ensure the normal operation of the business and avoid data loss, the data in the backup block device should be synchronously moved to the original block device.

[0072] Preferably, it also includes a deletion module for deleting the storage path of the backup block device. To ensure data persistence for future reuse, once the original block device is repaired, there is no need to deploy a backup block device. The backup block device should be unloaded and its storage path deleted, and the original block device should be used for data reading and writing.

[0073] Preferably, it further includes: a setting module for setting the storage path of the original block device to read-only. In specific implementations, when the original block device is detected to have become read-only, the storage path of the created backup block device is in a normal read-write state, and all paths of the original block device should also be set to read-only to avoid read-write path corruption after the original block device's state is restored.

[0074] Preferably, it also includes a prompting module for sending prompting signals. In specific implementations, when the status of the original device is detected to have changed to read-only, the controller can also send a prompting signal to prompt technicians to repair the original device and ensure the operation of services.

[0075] Furthermore, when writing data to the spare block device, a storage tag should be attached, which is used to characterize the storage location of the data in the original block device;

[0076] Correspondingly, moving data from the spare block device to the original block device involves moving the data from the spare block device to the original block device based on the storage tag.

[0077] The data storage device provided in this application embodiment, when detecting that the original block device's state has changed to read-only, calls a reserved backup block device and establishes a storage path for the backup block device. During write operations, data is written to the backup block device through the storage path. During read operations, data is first read from the original block device; if no data is found, it is read from the backup block device through the storage path. Compared to current technologies where data storage is impossible after a block device failure, requiring repeated controller restarts to restore storage availability, and where switching between multiple block device paths can lead to path management chaos and unavailability, impacting business operations, this technical solution pre-reserves a backup block device. When the original block device fails, the backup block device is used for storage. During write operations, data is directly written to the backup block device; during read operations, data is first read from the original block device, and only read from the backup block device if no data is found. This technical solution, by using the backup block device for storage when the original block device fails, eliminates the need for controller restarts, ensuring uninterrupted business operations and successful data persistence.

[0078] Figure 4 A structural diagram of another data storage device provided in the embodiments of this application is shown below. Figure 4 As shown, the device includes: a memory 20 for storing computer programs;

[0079] The processor 21 is configured to implement the steps of the data storage method as described in the above embodiments when executing a computer program.

[0080] The data storage device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0081] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0082] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the data storage method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, storage markers, prompt signals, etc.

[0083] In some embodiments, the data storage device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0084] Those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the data storage device and may include more or fewer components than illustrated.

[0085] The data storage device provided in this application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following methods: when the state of the original block device is detected to change to a read-only state, a reserved spare block device is called and a storage path for the spare block device is established; during a write operation, data is written to the spare block device through the storage path; during a read operation, data is first read from the original block device, and if no data is read, data is read from the spare block device through the storage path.

[0086] The data storage device provided in this application embodiment, when detecting that the original block device's state has changed to read-only, calls a reserved backup block device and establishes a storage path for the backup block device. During write operations, data is written to the backup block device through the storage path. During read operations, data is first read from the original block device; if no data is found, it is read from the backup block device through the storage path. Compared to current technologies where data storage is impossible after a block device failure, requiring repeated controller restarts to restore storage availability, and where switching between multiple block device paths can lead to path management chaos and unavailability, impacting business operations, this technical solution pre-reserves a backup block device. When the original block device fails, the backup block device is used for storage. During write operations, data is directly written to the backup block device; during read operations, data is first read from the original block device, and only read from the backup block device if no data is found. This technical solution, by using the backup block device for storage when the original block device fails, eliminates the need for controller restarts, ensuring uninterrupted business operations and successful data persistence.

[0087] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.

[0088] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0089] The computer-readable storage medium provided in this application, when detecting that the original block device's state has changed to read-only, invokes a reserved backup block device and establishes a storage path for the backup block device. During write operations, data is written to the backup block device through the storage path. During read operations, data is preferentially read from the original block device; if no data is found, it is read from the backup block device through the storage path. Compared to current technologies where data storage is impossible after a block device failure, requiring repeated controller restarts for storage recovery and availability, and where multi-path switching of block devices can lead to path management chaos and unavailability, impacting business operations, this technical solution pre-reserves a backup block device. When the original block device fails, the backup block device is invoked for storage. During write operations, data is directly written to the backup block device; during read operations, data is preferentially read from the original block device, and only read from the backup block device if no data is found. This technical solution, by using the backup block device for storage when the original block device fails, eliminates the need for controller restarts, ensuring uninterrupted business operations and successful data persistence.

[0090] The data storage method, apparatus, and medium provided in this application have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0091] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A data storage method, characterized in that, include: When the status of the original block device is detected to change to read-only, the reserved spare block device is invoked and the storage path of the spare block device is established. During a write operation, data is written to the spare block device through the storage path and a storage tag is attached. The storage tag is used to characterize the storage location of the data in the original block device. During a read operation, data is first read from the original block device. If the data is not read, the data is read from the backup block device through the storage path. If the original device is restored to a normal read / write state, the following is also included: The data in the spare block device is moved to the original block device according to the storage tag.

2. The data storage method according to claim 1, characterized in that, If the original device is restored to a normal read / write state, the following is also included: The storage path for the recovered data is the storage path of the original block device.

3. The data storage method according to claim 2, characterized in that, After the step of moving the data from the spare block device to the original block device, the method further includes: Delete the storage path of the spare block device.

4. The data storage method according to claim 1, characterized in that, When the state of the original block device is detected to have changed to read-only, the following is also included: Set the storage path of the original block device to read-only.

5. The data storage method according to claim 1, characterized in that, When the status of the original block device is detected to have changed to read-only, the function also includes sending a prompt signal.

6. A data storage device, characterized in that, include: The calling module is used to call the reserved backup block device and establish the storage path of the backup block device when the state of the original block device is detected to change to read-only state; The write data module is used to write data to the spare block device through the storage path and attach a storage tag during a write operation. The storage tag is used to characterize the storage location of the data in the original block device. The data read module is used to prioritize reading data from the original block device during a read operation. If the data is not read, the data is read from the backup block device through the storage path. A moving module is used to move data from the spare block device to the original block device according to the storage tag.

7. A data storage device, characterized in that, Includes memory used to store computer programs; A processor, configured to implement the steps of the data storage method as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data storage method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Storing and searching data by using cooperation storing device redundantly

    CN101415024A

  • Method for improving high availability of cloud storage system

    CN107528719A