IP Library Granted Patent US 11,907,076
Granted Patent B2
US 11,907,076 · App. 18/013,522 · Granted Feb 20, 2024

Data snapshot method and apparatus, computer device, and storage medium

Inventor: Bin Hou (Jiangsu, CN)
Assignee: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
G06F11/1451G06F11/1448G06F11/1458
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,907,076
App. No.
18/013,522
Granted
Feb 20, 2024
Kind
B2
Abstract

The present disclosure relates to a data snapshot method and apparatus, a computer device and a storage medium. The method includes: acquiring the capacity of to-be-written data after snapshot, and comparing the capacity of the to-be-written data with a preset capacity; when the capacity of the to-be-written data is greater than or equal to the preset capacity, writing the to-be-written data into a snapshot volume in a Redirect On Write manner; when the capacity of the to-be-written data is less than the preset capacity, writing the to-be-written data into a solid state drive in a Redirect On Write manner; and when a background write-back thread detects that there is data writing into the solid state drive, writing corresponding data in a source volume into the snapshot volume in a Copy On Write manner, and writing the to-be-written data in the solid state drive into the source volume.

Claims (59)

1. A data snapshot method, the method comprising:

acquiring the capacity of to-be-written data after snapshot, and comparing the capacity of the to-be-written data with a preset capacity;

when the capacity of the to-be-written data is greater than or equal to the preset capacity, writing the to-be-written data into a snapshot volume in a Redirect On Write manner;

when the capacity of the to-be-written data is less than the preset capacity, writing the to-be-written data into a solid state drive in a Redirect On Write manner; and

when a background write-back thread detects that there is data writing into the solid state drive, writing corresponding data in a source volume into the snapshot volume in a Copy On Write manner, and writing the to-be-written data in the solid state drive into the source volume.

2. The method according to claim 1 , wherein the method further comprises:

when the to-be-written data in the solid state drive has been written into the source volume, releasing data space written in the solid state drive.

3. The method according to claim 1 , wherein the step of when the capacity of the to-be-written data is greater than or equal to the preset capacity, writing the to-be-written data into a snapshot volume in a Redirect On Write manner comprises:

acquiring the to-be-written data;

writing the to-be-written data into a snapshot volume; and

updating index information of newly written data in the snapshot volume.

4. The method according to claim 1 , wherein the step of when the capacity of the to-be-written data is less than the preset capacity, writing the to-be-written data into a solid state drive in a Redirect On Write manner comprises:

acquiring the to-be-written data;

writing the to-be-written data into a solid state drive; and

updating index information of newly written data in the solid state drive.

5. The method according to claim 1 , wherein the step of when a background write-back thread detects that there is data writing into the solid state drive, writing corresponding data in a source volume into the snapshot volume in a Copy On Write manner, and writing the to-be-written data in the solid state drive into the source volume comprises:

acquiring corresponding data of the to-be-written data in a source volume;

writing the corresponding data of the to-be-written data into the snapshot volume, and updating index information of the snapshot volume;

acquiring newly written data in the solid state drive; and

replacing the corresponding data of the to-be-written data in the source volume with the newly written data in the solid state drive, and updating index information of the source volume.

6. The method according to claim 1 , wherein the preset capacity is 128 KB.

7. The method according to claims 1 , wherein the source volume and the snapshot volume are both Hard Disk Drives.

8. The method according to claim 1 , wherein the to-be-written data refers to corresponding data that, after snapshot, when a snapshot software monitors and tracks changes in original data, a writing operation is performed on.

9. The method according to claim 8 , wherein the capacity of the to-be-written data is the size of data corresponding to the writing operation.

10. The method according to claim 1 , wherein the snapshot volume refers to a snapshot data storage space, and the source volume refers to an original data storage space.

11. The method according to claim 3 , wherein when the to-be-written data is written into a snapshot volume, data to be modified in the source volume keeps unchanged.

12. The method according to claim 5 , wherein the step of replacing the corresponding data of the to-be-written data in the source volume with the newly written data in the solid state drive comprises:

copying the newly written data in the solid state drive to location of the to-be-written data in the source volume to cover the to-be-written data.

13. The system according to claim 5 , wherein after updating index information of the source volume, the method further comprises:

storing the index information of the source volume.

14. A computer device, comprising:

at least one processor; and

a memory, wherein the memory stores a computer program which can be run on the at least one processor, and the computer program, when being executed by the at least one processor, causes the at least one processor to:

acquiring the capacity of to-be-written data after snapshot, and comparing the capacity of the to-be-written data with a preset capacity;

under the condition that the capacity of the to-be-written data is greater than or equal to the preset capacity, writing the to-be-written data into a snapshot volume in a Redirect On Write manner;

under the condition that the capacity of the to-be-written data is less than the preset capacity, writing the to-be-written data into a solid state drive in a Redirect On Write manner; and

under the condition that a background write-back thread detects that there is data writing into the solid state drive, writing corresponding data in a source volume into the snapshot volume in a Copy On Write manner, and writing the to-be-written data in the solid state drive into the source volume.

15. The computer device according to claim 14 , wherein the computer program, when being executed by the at least one processor, causes the at least one processor to:

under the condition that the to-be-written data in the solid state drive has been written into the source volume, releasing data space written in the solid state drive.

16. The computer device according to claim 14 , wherein the computer program, when being executed by the at least one processor, causes the at least one processor to:

acquiring the to-be-written data;

writing the to-be-written data into a snapshot volume; and

updating index information of newly written data in the snapshot volume.

17. The computer device according to claim 14 , wherein the computer program, when being executed by the at least one processor, causes the at least one processor to:

acquiring the to-be-written data;

writing the to-be-written data into a solid state drive; and

updating index information of newly written data in the solid state drive.

18. The computer device according to claim 14 , wherein the computer program, when being executed by the at least one processor, causes the at least one processor to:

acquiring corresponding data of the to-be-written data in a source volume;

writing the corresponding data of the to-be-written data into the snapshot volume, and updating index information of the snapshot volume;

acquiring newly written data in the solid state drive; and

replacing the corresponding data of the to-be-written data in the source volume with the newly written data in the solid state drive, and updating index information of the source volume.

19. The computer device according to claim 18 , wherein the computer program, when being executed by the at least one processor, causes the at least one processor to:

copying the newly written data in the solid state drive to location of the to-be-written data in the source volume to cover the to-be-written data.

20. A non-transitory computer-readable storage medium, wherein a computer program stored on the computer-readable storage medium, and when the computer program is executed by at least one processor, the computer program following operations are implemented:

acquiring the capacity of to-be-written data after snapshot, and comparing the capacity of the to-be-written data with a preset capacity;

under the condition that the capacity of the to-be-written data is greater than or equal to the preset capacity, writing the to-be-written data into a snapshot volume in a Redirect On Write manner;

under the condition that the capacity of the to-be-written data is less than the preset capacity, writing the to-be-written data into a solid state drive in a Redirect On Write manner; and

under the condition that a background write-back thread detects that there is data writing into the solid state drive, writing corresponding data in a source volume into the snapshot volume in a Copy On Write manner, and writing the to-be-written data in the solid state drive into the source volume.

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 15, 2024
From: HOU, BIN
To: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 066121/0021 →
Priority Claims (1)
CN 202010705961.8 · Jul 21, 2020 · national
Continuity (1)
Related Publication 20230385155A1 · Nov 30, 2023