IP Library › Granted Patent US 10,725,692
Granted Patent B2
US 10,725,692 · App. 16/232,815 · Granted Jul 28, 2020

Data storage method and apparatus

Inventor: Yanhui Zhong (Chengdu, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F3/0655G06F3/0604G06F3/067G06F11/1076
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 10,725,692
App. No.
16/232,815
Granted
Jul 28, 2020
Kind
B2
Abstract

A data storage method and an apparatus are provided in a distributed storage system including a computing node and a plurality of storage nodes. The computing node writes the N data slices and the M check slices into the R storage nodes in each storage node group to improve reliability and stability of data in a data center.

Claims (31)

1. A data storage method in a distributed storage system comprising a computing node and a plurality of storage nodes, the method performed by the computing node, the method comprising:

receiving a data storage request comprises to-be-stored data;

determining a hash partition to store the to-be-stored data, wherein the hash partition comprises a first storage node group and a second storage node group, the first storage node group comprises R storage nodes that belong to a first data center, the second storage node group comprises R storage nodes that belong to a second data center, and R is an integer greater than 2;

dividing the to-be-stored data into N data slices, and obtaining M check slices of the N data slices, wherein N and M are positive integers, and N+M=R; and

separately writing the N data slices and the M check slices into the R storage nodes in the first storage node group and the R storage nodes in the second storage node group.

2. The method according to claim 1 , wherein the data storage request further comprises a key, the method further comprising:

determining based on the key, the hash partition to store the to-be-stored data.

3. The method according to claim 1 , wherein the hash partition is determined from the first data center and the second data center by a management node in the distributed storage system based on a fault tolerance level of the distributed storage system.

4. The method according to claim 1 , further comprising:

writing the N data slices and the M check slices into the R storage nodes in the first storage node group; and

copying, into the R storage nodes in the second storage node group, the N data slices and the M check slices that are stored in the R storage nodes in the first storage node group.

5. The method according to claim 4 , further comprising:

repairing a slice that fails to be written into a storage node in the first storage node group when a quantity of slices that fail to be written into the first storage node group is less than or equal to M; and

copying, into the R storage nodes in the second storage node group, the repaired slice.

6. The method according to claim 4 , further comprising:

repairing a slice that fails to be copied into the second storage node group when a quantity of slices that fail to be copied into the second storage node group is less than or equal to M.

7. A computing node in a distributed storage system comprising the computing node and a plurality of storage nodes, the computing node comprising:

a communications interface configured to receive a data storage request comprising to-be-stored data; and

a processor coupled to the communications interface and configured to:

determine a hash partition to store the to-be-stored data,

divide the to-be-stored data into N data slices, and obtain M check slices of the N data slices, and

separately write the N data slices and the M check slices into R storage nodes in a first storage node group and R storage nodes in a second storage node group, wherein the hash partition comprises the first storage node group and the second storage node group, the first storage node group comprises R storage nodes that belong to a first data center, the second storage node group comprises R storage nodes that belong to a second data center, R is an integer greater than 2, N and M are positive integers, and N+M=R.

8. The computing node according to claim 7 , wherein the data storage request further comprises a key, and the processor is further configured to determine, based on the key, the hash partition to store the to-be-stored data.

9. The computing node according to claim 7 , wherein the processor is further configured to determine the hash partition from the first data center and the second data center based on a fault tolerance level of the distributed storage system.

10. The computing node according to claim 7 , wherein the processor is further configured to:

write the N data slices and the M check slices into the R storage nodes in the first storage node group; and copy, into the R storage nodes in the second storage node group, the N data slices and the M check slices that are stored in the R storage nodes in the first storage node group.

11. The computing node according to claim 10 , wherein the processor is further configured to:

repair a slice that fails to be written into a storage node in the first storage node group when a quantity of slices that fail to be written into the first storage node group is less than or equal to M; and

copy, into the R storage nodes in the second storage node group, the repaired slice.

12. The computing node according to claim 10 , wherein the processor is further configured to:

repair a slice that fails to be written into the second storage node group when a quantity of slices that fail to be copied into the second storage node group is less than or equal to M.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 19, 2019
From: ZHONG, YANHUI
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 048637/0331 →
Priority Claims (1)
CN 2016 1 0481388 · Jun 28, 2016 · national
Continuity (2)
Continuation PCTCN2017072080 · Jan 22, 2017
Related Publication 20190129649A1 · May 2, 2019