DATA STORAGE METHOD, DEVICE, AND SYSTEM
FIG2 is a schematic structural diagram of DHT-based distributed data routing in the prior art
FIG2 is a schematic structural diagram of distributed data routing based on a distributed hash table (Distributed Hash Table, DHT) in the prior art. One DHT ring corresponds to one storage resource pool, the DHT ring includes a plurality of partitions, and each partition includes N+M storage nodes in the storage resource pool. plog is a data unit, each data unit corresponds to one partition, and each data unit is mapped to a segment of storage space on the storage nodes included in the partition. When the storage client 100 stores to-be-written data, the management server assigns a data unit (plog) for the to-be-written data and sends an identifier of the data unit to the storage client. The storage client calculates a hash value of the identifier of the data unit, determines, based on the calculated hash value, a partition corresponding to the data unit, queries a partition view to determine a list of storage nodes corresponding to the partition, performs EC coding on the to-be-written data, and stores generated EC blocks into storage nodes included in the list of storage nodes. The list of storage nodes is also referred to as a DHT partition table.
schematic structural diagram
2
Table be generated is quantity
['1. A data storage system, wherein the data storage system comprises a storage client (100, 800) and a distributed storage system (200), the distributed storage system uses an erasure coding, EC, technology to store data, the distributed storage system comprises a management server (201) and a plurality of storage nodes (202), and a storage node group consisting of N+M storage nodes corresponds to one partition, wherein N storage nodes are configured to store data blocks, M storage nodes are configured to store parity blocks generated based on the data blocks, and N and M are positive integers greater than 2; the storage client (100, 800) is configured to request the management server (201) to assign a data unit for to-be-written data; the management server (201) is configured to: assign a first data unit for the to-be-written data in a first partition, and return an identifier of the first data unit and a status of the first data unit to the storage client (100, 800), wherein the status of the first data unit indicates storage nodes that the storage client is allowed to use in the first partition, and a quantity of the storage nodes that the storage client is allowed to use is less than N+M; the storage client (100, 800) is further configured to obtain the identifier of the first data unit, the status of the first data unit, and a first partition view of the first partition, wherein the first partition view indicates a list of storage nodes comprised in the first partition; the storage client (100, 800) is further configured to: determine, based on the status of the first data unit, quantities of data blocks and parity blocks that need to be generated, and perform EC coding on the to-be-written data, to generate data blocks and parity blocks corresponding to the to-be-written data, wherein a sum of quantities of the generated data blocks and parity blocks is equal to the quantity of the storage nodes that the storage client is allowed to use; and the storage client (100, 800) is further configured to store, based on the first partition view and the status of the first data unit, the generated data blocks and parity blocks into the storage nodes that the storage client is allowed to use in the first partition, wherein each node stores one data block or parity block.']