Patent ID: 9710331
Date: 2017-07-18
CPC Classifications: G06F

Claim:
1. A data storage method for use in a distributed storage system, wherein a storage node group of the distributed storage system comprises at least m+k storage nodes, in which one storage node is a primary storage node and others are secondary storage nodes, wherein m and k are both positive integers, wherein the data storage method is performed by the primary storage node, and the method comprises: receiving a data segment, forming an erasure coding (EC) strip by performing erasure coding on the data segment, wherein the EC strip comprises m data blocks and k parity blocks; determining m+k target storage nodes in the storage node group for storing the EC strip, wherein each target storage node stores one block of the EC strip; sending a preparation message to each of the target storage nodes and receive a response message from the target storage node, wherein the preparation message comprises a block of the EC strip to be stored by the target storage node, and the response message indicates that the target storage node has generated a preparation log according to the preparation message, wherein the preparation log comprises the block to be stored by the target storage node; and after receiving response messages from all the target storage nodes, sending an execution message to each of the target storage nodes, instructing the target storage node to store the received block of the EC strip.