A data recovery method, applied to a distributed storage system, wherein the distributed storage system stores data by using erasure coding EC stripes, each EC stripe comprises a data part and a parity part, the data part of each EC stripe comprises m data blocks, the parity part of each EC stripe comprises k parity blocks that are obtained after parity coding is performed on the m data blocks, and the m data blocks and the k parity blocks constitute EC blocks of each EC stripe; each EC stripe corresponds to a key value, key values of EC stripes having same address ranges of data parts are the same, and key values of EC stripes having different address ranges of data parts are different; the distributed storage system comprises multiple storage node groups, each storage node group comprises not less than m+k storage nodes, one EC stripe includes m+k EC blocks, which are respectively stored in m+k storage nodes in a storage node group, one primary storage node is specified in each storage node group, and nodes in each storage node group except the primary storage node are secondary storage nodes, wherein m and k are both positive integers; and when a faulty storage node exists in secondary storage nodes in any one of the storage node groups, the method is executed by a primary storage node in the any one of the storage node groups and comprises: after fault recovery of the faulty storage node, receiving a recovery message sent by the faulty storage node; obtaining N lost EC blocks of the faulty storage node through computation by using the EC technology according to EC blocks stored by non-faulty storage nodes in the storage node group, wherein the N is a positive integer; sequentially sending the N lost EC blocks to the faulty storage node for storage; in the process of sequentially sending the N lost EC blocks to the faulty storage node, if the primary storage node generates a first EC block and determines that the first EC block is to be stored by the faulty storage node, determining whether a second EC block having a same key value as the first EC block exists in the lost EC blocks that are currently not stored successfully by the faulty storage node; and if it is determined that the second EC block exists, after the faulty storage node successfully stores the second EC block, sending the first EC block to the faulty storage node to execute storage. after fault recovery of the faulty storage node, receiving a recovery message sent by the faulty storage node; obtaining N lost EC blocks of the faulty storage node through computation by using the EC technology according to EC blocks stored by non-faulty storage nodes in the storage node group, wherein the N is a positive integer; sequentially sending the N lost EC blocks to the faulty storage node for storage; in the process of sequentially sending the N lost EC blocks to the faulty storage node, if the primary storage node generates a first EC block and determines that the first EC block is to be stored by the faulty storage node, determining whether a second EC block having a same key value as the first EC block exists in the lost EC blocks that are currently not stored successfully by the faulty storage node; and if it is determined that the second EC block exists, after the faulty storage node successfully stores the second EC block, sending the first EC block to the faulty storage node to execute storage.